ObjectSchema constructor

ObjectSchema([
  1. bool? allowUndefined,
  2. bool? req,
  3. List<IValidationRule>? rules
])

Creates a new validation schema and sets its values.

  • allowUndefined true to allow properties undefines in the schema
  • required (optional) true to always require non-null values.
  • rules (optional) a list with validation rules.

See IValidationRule

Implementation

ObjectSchema([bool? allowUndefined, bool? req, List<IValidationRule>? rules])
    : super(req, rules) {
  _allowUndefined = allowUndefined;
}