-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular Material - validation message not showing if required set dynamically #2106
Comments
Thanks @aitboudad.. when will be this available? |
up to Monday |
Thanks @aitboudad, that's pretty quick.. |
This issue has been fixed and released as part of v5.5.13 release. Please let us know, in case you are still encountering a similar issue/problem. |
Thanks @aitboudad.. Now it shows validation message but it doesn't hide once it is shown. I have updated the packages on same sample link - https://stackblitz.com/edit/ngx-formly-validation-msg If i add some test to field1 then field2 show mandatory () and if focus on field2, then it shows validation message but it doesn't hide the validation message and shows red even if i remove values from field1 (which is not mandatory - but removes () from field2).. Is it something you can take a look please? let me know if you need more details on replicating it. Thanks. |
expressionProperties: {
'templateOptions.required': (model: any, formState: any, fieldConfig: FormlyFieldConfig) => {
+ return !!model.field1;
- return model.field1;
},
} |
Ofcourse.. Thanks, it works fine on our code. |
First of all, thanks alot for the awesome library. It is easy to configure and flexible to modify as we want.
I have an requirement to set field2 as required based on field1. It works absolutely fine but validation message doesn't show properly. Here is the simple example which I have created,
stackblitz
Steps to reproduce:
I am not sure if this is something to do with Angular material.
The text was updated successfully, but these errors were encountered: