1
0
Fork 0
mirror of synced 2024-09-28 23:41:23 +12:00

Better structure error

This commit is contained in:
eldadfux 2019-09-28 22:30:56 +03:00
parent 7f0f533982
commit 5d8661fd27

View file

@ -187,8 +187,12 @@ class Structure extends Validator
if (empty($validator)) { // Error creating validator for property
$this->message = 'Unknown rule type "' . $ruleType . '" for property "' . htmlspecialchars($key, ENT_QUOTES, 'UTF-8') . '"';
// $this->message = 'Unknown property "'.$key.'" type'.
// '. Make sure to follow '.strtolower($collection->getAttribute('name', 'unknown')).' collection structure';
if(empty($ruleType)) {
$this->message = 'Unknown property "'.$key.'" type'.
'. Make sure to follow '.strtolower($collection->getAttribute('name', 'unknown')).' collection structure';
}
return false;
}