Class Validator
Common validators.
- Nette\Forms\Validator uses Nette\StaticClass
public static
|
|
public static
boolean
|
#
validateEqual(
Is control's value equal with second parameter? |
public static
boolean
|
#
validateNotEqual(
Is control's value not equal with second parameter? |
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
#
validateRange(
Is a control's value number in specified range? |
public static
boolean
|
#
validateMin(
Is a control's value number greater than or equal to the specified minimum? |
public static
boolean
|
#
validateMax(
Is a control's value number less than or equal to the specified maximum? |
public static
boolean
|
#
validateLength(
Count/length validator. Range is array, min and max length pair. |
public static
boolean
|
#
validateMinLength(
Has control's value minimal count/length? |
public static
boolean
|
#
validateMaxLength(
Is control's value count/length in limit? |
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
#
validatePattern(
Does the control's value match the regular expression? Case-sensitive to comply with the HTML5 <input /> pattern attribute behaviour |
public static
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
boolean
|
#
validateMimeType(
Has file specified mime type? |
public static
boolean
|
__callStatic(),
__construct()
|
public static
array
|
$messages
|
# [
Form::PROTECTION => 'Your session has expired. Please return to the home page and try again.',
Form::EQUAL => 'Please enter %s.',
Form::NOT_EQUAL => 'This value should not be %s.',
Form::FILLED => 'This field is required.',
Form::BLANK => 'This field should be blank.',
Form::MIN_LENGTH => 'Please enter at least %d characters.',
Form::MAX_LENGTH => 'Please enter no more than %d characters.',
Form::LENGTH => 'Please enter a value between %d and %d characters long.',
Form::EMAIL => 'Please enter a valid email address.',
Form::URL => 'Please enter a valid URL.',
Form::INTEGER => 'Please enter a valid integer.',
Form::FLOAT => 'Please enter a valid number.',
Form::MIN => 'Please enter a value greater than or equal to %d.',
Form::MAX => 'Please enter a value less than or equal to %d.',
Form::RANGE => 'Please enter a value between %d and %d.',
Form::MAX_FILE_SIZE => 'The size of the uploaded file can be up to %d bytes.',
Form::MAX_POST_SIZE => 'The uploaded data exceeds the limit of %d bytes.',
Form::MIME_TYPE => 'The uploaded file is not in the expected format.',
Form::IMAGE => 'The uploaded file must be image in format JPEG, GIF or PNG.',
Controls\SelectBox::VALID => 'Please select a valid option.',
Controls\UploadControl::VALID => 'An error occurred during file upload.',
] |