Max
in package
implements
ValueValidateInterface
値の最大範囲値をバリデーションするクラス
Table of Contents
Interfaces
Properties
- $messageFormat : string
- $threshold : float
Methods
- __construct() : mixed
- 新しいインスタンスを構築します
- execute() : ValidateResult
- バリデーションを実行します
Properties
$messageFormat
protected
string
$messageFormat
= 'Invalid value. Specify a value of %s or less.'
$threshold
protected
float
$threshold
Methods
__construct()
新しいインスタンスを構築します
public
__construct(int|float $threshold) : mixed
Parameters
- $threshold : int|float
-
最大範囲値を指定します
execute()
バリデーションを実行します
public
execute(mixed $value, ValidateResult $result) : ValidateResult
Parameters
- $value : mixed
-
バリデーション対象の値を渡します
- $result : ValidateResult
-
バリデーション結果を格納するインスタンスを渡します
Return values
ValidateResult —バリデーション結果を返します