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 MobileCn

Check if the input is valid Chinese mobile number

Wei\Base
Extended by Wei\Validator\BaseValidator
Extended by Wei\Validator\Regex
Extended by Wei\Validator\MobileCn
Namespace: Wei\Validator
Author: Twin Huang twinhuang@qq.com
Located at Validator/MobileCn.php
Methods inherited from Wei\Validator\Regex
__invoke(), doValidate()
Methods inherited from Wei\Validator\BaseValidator
addError(), getErrors(), getFirstMessage(), getJoinedMessage(), getMessages(), 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 $patternMessage
# '%name% must be valid mobile number'
protected string $pattern

The regex pattern

The regex pattern

# '/^1[3458][\d]{9}$/'
Properties inherited from Wei\Validator\Regex
$negativeMessage
Properties inherited from Wei\Validator\BaseValidator
$errors, $name, $negative, $notStringMessage, $validator
Properties inherited from Wei\Base
$providers, $wei
Magic properties inherited from Wei\Validator\BaseValidator
$t
Wei Framework API documentation generated by ApiGen