Expand description
The rules themselves, and the two ways to declare them.
A rule set can be written the way it is in Laravel — "required|email|max:255"
— or built up with methods: Rule::required().email().max(255). Both land on
the same Rules value, so nothing downstream has to care which was used.
The string form is what a developer already knows and what a config file or
a generator can emit; the builder form is what the compiler can check, so a
misspelled rule is a compile error instead of a runtime panic.
Structs§
- Rules
- An ordered set of rules for one field.
Enums§
- Rule
- One validation rule, with its parameters already parsed.
Traits§
- Into
Rules - Anything that can name a rule set when registering a field.