validate method
Implementation
Map<String, dynamic> validate(Map<String, dynamic> data) {
final validatorContext = ValidatorContext(reporter, data);
final field = Property('', data);
_schema.parse(validatorContext, field);
if (reporter.hasError) {
throw reporter.createError({'errors': reporter.errors});
}
reporter.clear();
return field.value;
}