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