rsuite / schema-typed

Schema for data modeling & validation
MIT License
198 stars 28 forks source link

feat: add support for `label` method #77

Closed simonguo closed 7 months ago

simonguo commented 7 months ago

label(label: string)

Overrides the key name in error messages.

MixedType().label('Username');

Eg:

SchemaModel({
  first_name: StringType().label('First name'),
  age: NumberType().label('Age')
});