We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement attribute validator for objects, such as:
class Customer { public $name; public $email; public $address; } class Address { public $street; public $number; } $customer = new Customer(); $customer->name = "John Doe"; $customer->email = "[email protected]"; $customer->address = new Address(); $customer->address->street = "Lorem ipsum dolor"; $customer->address->number= 123; $customerValidator = v::attr("name", v::string()->minLength(5)); $customerValidator->attr("email", v::email()); $customerValidator->attr("address", v::attr("street", v::string())->attr("number", v::int())); $customerValidator->validate($customer); //true
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Implement attribute validator for objects, such as:
The text was updated successfully, but these errors were encountered: