Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • Container
  • ControlGroup
  • Form
  • Helpers
  • Rule
  • Rules
  • Validator

Interfaces

  • IControl
  • IFormRenderer
  • ISubmitterControl
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Validator

Common validators.

Nette\Object
Extended by Nette\Forms\Validator
Namespace: Nette\Forms
Located at Forms/Validator.php
Methods summary
public static boolean
# validateEqual( Nette\Forms\IControl $control, $arg )

Is control's value equal with second parameter?

Is control's value equal with second parameter?

Returns

boolean
bool
public static boolean
# validateNotEqual( Nette\Forms\IControl $control, $arg )

Is control's value not equal with second parameter?

Is control's value not equal with second parameter?

Returns

boolean
bool
public static boolean
# validateFilled( Nette\Forms\IControl $control )

Is control filled?

Is control filled?

Returns

boolean
bool
public static boolean
# validateBlank( Nette\Forms\IControl $control )

Is control not filled?

Is control not filled?

Returns

boolean
bool
public static boolean
# validateValid( Nette\Forms\IControl $control )

Is control valid?

Is control valid?

Returns

boolean
bool
public static boolean
# validateRange( Nette\Forms\IControl $control, $range )

Is a control's value number in specified range?

Is a control's value number in specified range?

Returns

boolean
bool
public static boolean
# validateMin( Nette\Forms\IControl $control, $minimum )

Is a control's value number greater than or equal to the specified minimum?

Is a control's value number greater than or equal to the specified minimum?

Returns

boolean
bool
public static boolean
# validateMax( Nette\Forms\IControl $control, $maximum )

Is a control's value number less than or equal to the specified maximum?

Is a control's value number less than or equal to the specified maximum?

Returns

boolean
bool
public static boolean
# validateLength( Nette\Forms\IControl $control, $range )

Count/length validator. Range is array, min and max length pair.

Count/length validator. Range is array, min and max length pair.

Returns

boolean
bool
public static boolean
# validateMinLength( Nette\Forms\IControl $control, $length )

Has control's value minimal count/length?

Has control's value minimal count/length?

Returns

boolean
bool
public static boolean
# validateMaxLength( Nette\Forms\IControl $control, $length )

Is control's value count/length in limit?

Is control's value count/length in limit?

Returns

boolean
bool
public static boolean
# validateSubmitted( Nette\Forms\Controls\SubmitButton $control )

Has been button pressed?

Has been button pressed?

Returns

boolean
bool
public static boolean
# validateEmail( Nette\Forms\IControl $control )

Is control's value valid email address?

Is control's value valid email address?

Returns

boolean
bool
public static boolean
# validateUrl( Nette\Forms\IControl $control )

Is control's value valid URL?

Is control's value valid URL?

Returns

boolean
bool
public static boolean
# validatePattern( Nette\Forms\IControl $control, $pattern )

Matches control's value regular expression?

Matches control's value regular expression?

Returns

boolean
bool
public static boolean
# validateInteger( Nette\Forms\IControl $control )

Is a control's value decimal number?

Is a control's value decimal number?

Returns

boolean
bool
public static boolean
# validateFloat( Nette\Forms\IControl $control )

Is a control's value float number?

Is a control's value float number?

Returns

boolean
bool
public static boolean
# validateFileSize( Nette\Forms\Controls\UploadControl $control, $limit )

Is file size in limit?

Is file size in limit?

Returns

boolean
bool
public static boolean
# validateMimeType( Nette\Forms\Controls\UploadControl $control, $mimeType )

Has file specified mime type?

Has file specified mime type?

Returns

boolean
bool
public static boolean
# validateImage( Nette\Forms\Controls\UploadControl $control )

Is file image?

Is file image?

Returns

boolean
bool
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Properties summary
public static array $messages
#array( 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.', )
Magic properties inherited from Nette\Object
$reflection
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0