Schema constructor Null safety
- [bool? req,
- List<
IValidationRule> ? rules]
Creates a new instance of validation schema and sets its values.
required
(optional) true to always require non-null values.rules
(optional) a list with validation rules.
See IValidationRule