RuleInterface
in
Describes Rule interface.
Table of Contents
Methods
- getRule() : array<string, mixed>
- Retrieve a validation rule value by the given case-sensitive name.
- getRules() : array<string, array<string, mixed>>
- Retrieves all validation rule values.
- hasRule() : bool
- Checks if a rule exists by the given case-sensitive name.
- withoutRule() : static
- Return an instance without the specified rule.
- withRule() : static
- Return an instance with the provided value replacing the specified rule.
Methods
getRule()
Retrieve a validation rule value by the given case-sensitive name.
public
getRule(string $Name) : array<string, mixed>
Parameters
- $Name : string
-
The rule name.
Return values
array<string, mixed>getRules()
Retrieves all validation rule values.
public
getRules() : array<string, array<string, mixed>>
Return values
array<string, array<string, mixed>>hasRule()
Checks if a rule exists by the given case-sensitive name.
public
hasRule(string $Name) : bool
Parameters
- $Name : string
-
The rule name.
Return values
boolwithoutRule()
Return an instance without the specified rule.
public
withoutRule(string $Name) : static
Parameters
- $Name : string
-
The rule name.
Return values
staticwithRule()
Return an instance with the provided value replacing the specified rule.
public
withRule(string $Name, array<string, mixed> $Rule) : static
Parameters
- $Name : string
-
The rule name.
- $Rule : array<string, mixed>
-
The rule value.