Fix plant code validation logic in UserImporter
This commit is contained in:
@@ -56,7 +56,7 @@ class UserImporter extends Importer
|
||||
$warnMsg = [];
|
||||
$plant = null;
|
||||
if (Str::length($this->data['plant']) > 0) {
|
||||
if (Str::length($this->data['plant']) < 4 || !is_numeric($this->data['plant'] || !preg_match('/^[1-9]\d{3,}$/', $this->data['plant']))) {
|
||||
if (Str::length($this->data['plant']) < 4 || !is_numeric($this->data['plant']) || !preg_match('/^[1-9]\d{3,}$/', $this->data['plant'])) {
|
||||
$warnMsg[] = "Invalid plant code found!";
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user