Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • AbstractValidator
  • Callback
  • Equals
  • InArray
  • IsArray
  • IsBankAccountNumber
  • IsBirthNumber
  • IsCompanyId
  • IsCountryCode
  • IsDate
  • IsDateTime
  • IsEmail
  • IsIban
  • IsInt
  • IsIpV4
  • IsIpV6
  • IsNumeric
  • IsPhone
  • IsTaxId
  • IsUrl
  • IsZipCode
  • LessThan
  • NotEmpty
  • Regex
  • StringLengthBetween
  • StringLengthGreaterThan
  • StringLengthLessThan
  • Upload

Interfaces

  • ErrorMessage

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Regex

Validates a value using a regular expression.

Jyxo\Input\Validator\AbstractValidator implements Jyxo\Input\ValidatorInterface
Extended by Jyxo\Input\Validator\Regex
Namespace: Jyxo\Input\Validator
Category: Jyxo
Package: Jyxo\Input
Subpackage: Validator
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jan Pěček
Located at Input/Validator/Regex.php
Methods summary
public
# __construct( string $pattern )

Constructor.

Constructor.

Parameters

$pattern
string
Regular expression
public Jyxo\Input\Validator\Regex
# setPattern( string $pattern )

Sets the validation regular expression.

Sets the validation regular expression.

Parameters

$pattern
string
Regular expression

Returns

Jyxo\Input\Validator\Regex

Throws

Jyxo\Input\Validator\Exception
On empty regular expression
public string
# getPattern( )

Returns the validation regular expression.

Returns the validation regular expression.

Returns

string
public boolean
# isValid( mixed $value )

Validates a value.

Validates a value.

Parameters

$value
mixed
Input value

Returns

boolean

Implementation of

Jyxo\Input\ValidatorInterface::isValid
Methods inherited from Jyxo\Input\Validator\AbstractValidator
validate()
Properties summary
protected string $pattern
#

Regular expression.

Regular expression.

Jyxo PHP Library API documentation generated by ApiGen 2.3.0