Class Validator
Validates a schema against a hash of input.
Methods Summary
- __construct ( array $constraints = null )
-
validate ( string $name, Aws\Api\Shape $shape, array $input )
Validates the given input against the schema.
Methods Details
__construct ( array $constraints = null )
Parameters
array | $constraints = null | Associative array of constraints to enforce. Accepts the following keys: "required", "min", "max", and "pattern". If a key is not provided, the constraint will assume false. |
validate (
string
$name,
Aws\Api\Shape
$shape,
array
$input
)
Validates the given input against the schema.
Parameters
string | $name | Operation name |
Aws\Api\Shape |
$shape | Shape to validate |
array | $input | Input to validate |
Exceptions
InvalidArgumentException if the input is invalid. |