makeOptional method

Schema makeOptional()

Makes validated values optional. Validation for null values will be skipped.

This method returns reference to this exception to implement Builder pattern to chain additional calls.

Returns this validation schema

See makeRequired

Implementation

Schema makeOptional() {
  _required = false;
  return this;
}