Rules
in package
AbstractYes
Provides validation rules for inputs data.
Tags
Table of Contents
Methods
- arr() : RuleInterface
- Is array rule.
- boolean() : RuleInterface
- Is boolean rule.
- callbackValidation() : RuleInterface
- Validate through a callback
- equalsOrGreaterThan() : RuleInterface
- If a value is equals to or greater than some given value.
- in() : RuleInterface
- Verify if a value is in a set of given values.
- integer() : RuleInterface
- Is integer rule.
- isPrimitive() : RuleInterface
- Is a primitive type rule.
- numeric() : RuleInterface
- Is numeric rule.
- string() : RuleInterface
- Is string rule.
- uri() : RuleInterface
- Is an URI
Methods
arr()
Is array rule.
public
static arr() : RuleInterface
Return values
RuleInterfaceboolean()
Is boolean rule.
public
static boolean() : RuleInterface
Return values
RuleInterfacecallbackValidation()
Validate through a callback
public
static callbackValidation(callable $callback) : RuleInterface
Parameters
- $callback : callable
-
Callback with validation logic.
Return values
RuleInterfaceequalsOrGreaterThan()
If a value is equals to or greater than some given value.
public
static equalsOrGreaterThan(int $reference) : RuleInterface
Parameters
- $reference : int
-
Reference value.
Return values
RuleInterfacein()
Verify if a value is in a set of given values.
public
static in(array<string|int, mixed> $values) : RuleInterface
Parameters
- $values : array<string|int, mixed>
-
Acceptable values.
Return values
RuleInterfaceinteger()
Is integer rule.
public
static integer() : RuleInterface
Return values
RuleInterfaceisPrimitive()
Is a primitive type rule.
public
static isPrimitive() : RuleInterface
Tags
Return values
RuleInterfacenumeric()
Is numeric rule.
public
static numeric() : RuleInterface
Return values
RuleInterfacestring()
Is string rule.
public
static string() : RuleInterface
Return values
RuleInterfaceuri()
Is an URI
public
static uri() : RuleInterface