mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-31 07:01:54 +00:00
Changed the error messages for min and max. If I set a min value of 1 the error message says the value has to be greater than 1 - changed the error message to say the value must be at least 1. If I set a max value of 10 the error message says the value has to be less than 10 - changed the error message to say the value must be no more than 10.
34 lines
1.5 KiB
PHP
34 lines
1.5 KiB
PHP
<?php
|
|
|
|
return array(
|
|
'required' => "is required",
|
|
'equals' => "must be the same as '%s'",
|
|
'different' => "must be different than '%s'",
|
|
'accepted' => "must be accepted",
|
|
'numeric' => "must be numeric",
|
|
'integer' => "must be an integer (0-9)",
|
|
'length' => "must be longer than %d",
|
|
'min' => "must be at least than %s",
|
|
'max' => "must be no more than %s",
|
|
'in' => "contains invalid value",
|
|
'notIn' => "contains invalid value",
|
|
'ip' => "is not a valid IP address",
|
|
'email' => "is not a valid email address",
|
|
'url' => "not a URL",
|
|
'urlActive' => "must be an active domain",
|
|
'alpha' => "must contain only letters a-z",
|
|
'alphaNum' => "must contain only letters a-z and/or numbers 0-9",
|
|
'slug' => "must contain only letters a-z, numbers 0-9, dashes and underscores",
|
|
'regex' => "contains invalid characters",
|
|
'date' => "is not a valid date",
|
|
'dateFormat' => "must be date with format '%s'",
|
|
'dateBefore' => "must be date before '%s'",
|
|
'dateAfter' => "must be date after '%s'",
|
|
'contains' => "must contain %s",
|
|
'boolean' => "must be a boolean",
|
|
'lengthBetween' => "must be between %d and %d characters",
|
|
'creditCard' => "must be a valid credit card number",
|
|
"lengthMin" => "must contain greater than %d characters",
|
|
"lengthMax" => "must contain less than %d characters"
|
|
);
|