ngx-schema-form
ngx-schema-form copied to clipboard
How custom error message and i18n?
Does it exist any way to custom error message for required.
"properties": {
"contact": {
"title": "name",
"type": "string",
"widget": "input",
"maxLength": 16,
"required":"please input the name " //is it possible like this?
}
not for now, but should be quite easy to fix
Hi, I'm new to this project and was just playing around and hit the same issue. Does the form generator display validation errors out-of-the-box (irrespective of I18n)? I noticed that widget.ts has some code related to errorMessages, but none of the default widgets seem to be using it anywhere:
https://github.com/makinacorpus/angular2-schema-form/blob/c46cd13e8e7f412aa35cc64bee0547c18cb66406/src/widget.ts#L8-L31
There is nothing out-of-the-box to display error messages, but you can override the default widgets and display errors the way you want.