Selen

MinLength
in package
implements ValueValidateInterface

文字列の最小文字数をバリデーションするクラス

Table of Contents

Interfaces

ValueValidateInterface

Properties

$length  : int
$messageFormat  : string

Methods

__construct()  : mixed
新しいインスタンスを構築します
execute()  : ValidateResult
バリデーションを実行します

Properties

$messageFormat

protected string $messageFormat = 'Invalid value. Please specify a string of at least %s character.'

Methods

__construct()

新しいインスタンスを構築します

public __construct(int $length) : mixed
Parameters
$length : int

最小文字数を指定します

execute()

バリデーションを実行します

public execute(mixed $value, ValidateResult $result) : ValidateResult
Parameters
$value : mixed

バリデーション対象の値を渡します

$result : ValidateResult

バリデーション結果を格納するインスタンスを渡します

Return values
ValidateResult

バリデーション結果を返します


        
On this page

Search results