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 StringLengthBetween

Validates string length; must be between the given bounds.

Jyxo\Input\Validator\AbstractValidator implements Jyxo\Input\ValidatorInterface
Extended by Jyxo\Input\Validator\StringLengthBetween
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: Jakub Tománek
Located at Input/Validator/StringLengthBetween.php
Methods summary
public
# __construct( integer $min, integer $max )

Constructor.

Constructor.

Sets both maximal and minimal string length.

Parameters

$min
integer
Minimal length (string length must be greater of equal)
$max
integer
Maximal length (string length must be less or equal)

Throws

InvalidArgumentException
Arguments are invalid (less than zero or minimum is greater than maximum)
public Jyxo\Input\Validator\StringLengthBetween
# setMin( integer $min )

Sets the minimal string length.

Sets the minimal string length.

Parameters

$min
integer
Minimal string length

Returns

Jyxo\Input\Validator\StringLengthBetween

Throws

InvalidArgumentException
If the minimal length is negative or greater than the maximal length
public integer
# getMin( )

Return the minimal string length.

Return the minimal string length.

Returns

integer
public Jyxo\Input\Validator\StringLengthBetween
# setMax( integer $max )

Sets the maximal string length.

Sets the maximal string length.

Parameters

$max
integer
Maximal string length

Returns

Jyxo\Input\Validator\StringLengthBetween

Throws

InvalidArgumentException
If the maximal length is negative or lower than the minimal length
public integer
# getMax( )

Returns the maximum string length.

Returns the maximum string length.

Returns

integer
public boolean
# isValid( string $value )

Validates a value.

Validates a value.

Parameters

$value
string
Input value

Returns

boolean

Implementation of

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

Minimal string length.

Minimal string length.

protected integer $max
#

Maximal string length.

Maximal string length.

Jyxo PHP Library API documentation generated by ApiGen 2.3.0