Overview

Namespaces

  • None
  • PHP
  • Wei
    • Validator

Classes

  • All
  • AllOf
  • Alnum
  • Alpha
  • BaseValidator
  • Between
  • Blank
  • Callback
  • CharLength
  • Chinese
  • Color
  • Contains
  • CreditCard
  • Date
  • DateTime
  • Decimal
  • Digit
  • Dir
  • DivisibleBy
  • DoubleByte
  • Email
  • EndsWith
  • EqualTo
  • Exists
  • FieldExists
  • File
  • GreaterThan
  • GreaterThanOrEqual
  • IdCardCn
  • IdCardHk
  • IdCardMo
  • IdCardTw
  • IdenticalTo
  • Image
  • In
  • Ip
  • Length
  • LessThan
  • LessThanOrEqual
  • Lowercase
  • Luhn
  • MaxLength
  • MinLength
  • MobileCn
  • NaturalNumber
  • NoneOf
  • Null
  • Number
  • OneOf
  • Password
  • Phone
  • PhoneCn
  • PlateNumberCn
  • PositiveInteger
  • PostcodeCn
  • Present
  • QQ
  • RecordExists
  • Regex
  • Required
  • SomeOf
  • StartsWith
  • Time
  • Tld
  • Type
  • Uppercase
  • Url
  • Uuid
  • Overview
  • Namespace
  • Class
  • Tree

Class All

Check if all of the element in the input is valid by all specified rules

Wei\Base
Extended by Wei\Validator\BaseValidator
Extended by Wei\Validator\All
Namespace: Wei\Validator
Author: Twin Huang twinhuang@qq.com
Located at Validator/All.php
Methods summary
public boolean
# __invoke( array|Traversable $input, array $rules = array() )

Check if all of the element in the input is valid by all specified rules

Check if all of the element in the input is valid by all specified rules

Parameters

$input
The input to be validated
$rules
The validation rules

Returns

boolean

Overrides

Wei\Validator\BaseValidator::__invoke()
protected boolean
# doValidate( mixed $input )

Validate the input value (ignore the $negative property)

Validate the input value (ignore the $negative property)

Parameters

$input
The input to be validated

Returns

boolean
public array
# getMessages( string $name = null )

Returns the error messages

Returns the error messages

Parameters

$name
The name display in error message

Returns

array

Throws

UnexpectedValueException
When message contains unknown parameter

Overrides

Wei\Validator\BaseValidator::getMessages()
Methods inherited from Wei\Validator\BaseValidator
addError(), getErrors(), getFirstMessage(), getJoinedMessage(), getName(), hasError(), isString(), isValid(), loadTranslationMessages(), setMessages(), setName(), storeOption()
Methods inherited from Wei\Base
__call(), __construct(), __get(), getOption(), setOption()
Magic methods inherited from Wei\Validator\BaseValidator
t()
Properties summary
protected string $notArrayMessage
# '%name% must be of type array'
protected string $invalidMessage

This message is just a placeholder, would not display to user

This message is just a placeholder, would not display to user

# 'Some of the items is not valid'
protected string $itemName
# '%name%\'s %index% item'
protected array $rules
# array()
protected array $validators

The invalid validators

The invalid validators

# array()
Properties inherited from Wei\Validator\BaseValidator
$errors, $name, $negative, $negativeMessage, $notStringMessage, $validator
Properties inherited from Wei\Base
$providers, $wei
Magic properties inherited from Wei\Validator\BaseValidator
$t
Wei Framework API documentation generated by ApiGen