I'm submitting a ... (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request
Current behavior
When configuring formly as follows:
{
key: 'name',
type: 'input',
templateOptions: {
label: 'Name (required)',
required: true
}
}
..the form is properly invalidated, but the error message doesn't display. I'm using Angular Material here.
Expected behavior
The validation message shows 馃槈
Minimal reproduction of the problem with instructions
you have missed one small step, the error message should be defined in NgModule declaration:
FormlyModule.forRoot({
validationMessages: [
{ name: 'required', message: 'This field is required' },
],
}),
@aitboudad Oh, I thought those are built-in, as I didn't find them in the demo examples: https://formly.dev/examples/validation/built-in-validations
Oh, stupid me...it's in the FormlyModule.forRoot 馃檮
sorry 馃槗
no worry :smile: , a bunch of examples that cover all validation possibilities :) are there:

Most helpful comment
no worry :smile: , a bunch of examples that cover all validation possibilities :) are there: