You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this function only returns erros on the first element when trying to validate a data array(), and the custom error message is not parsed nore taken into account
for something like
array('name', 'required | maxlength(max=25) | minlength(min=3)({label} must have between {min} and {max} characters)(Name)',
'activity', 'required | maxlength(max=25) | minlength(min=3)({label} must have between {min} and {max} characters)(Activity)');
That's because, the way you wrote it you have defined only one rule; the one for the name.
If you want to define multiple rules at once you have to do something like
$validator->add(array(
'title' => 'required | maxlength(max=10)({label} must have less than {max} characters)(Title)',
'content' => 'required',
'source' => 'website'
));
this function only returns erros on the first element when trying to validate a data array(), and the custom error message is not parsed nore taken into account
for something like
array('name', 'required | maxlength(max=25) | minlength(min=3)({label} must have between {min} and {max} characters)(Name)',
'activity', 'required | maxlength(max=25) | minlength(min=3)({label} must have between {min} and {max} characters)(Activity)');
I get
array(1) { ["name"]=> array(1) { [0]=> object(Sirius\Validation\ErrorMessage)#713 (2) { ["template":protected]=> string(22) "This field is required" ["variables":protected]=> array(1) { ["value"]=> string(0) "" } } } }
The text was updated successfully, but these errors were encountered: