-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
mat-error not showing #18
Comments
Did you set on your form tag:
As far as I can tell, It is working on the example provided under On the other hand, I'm not using any custom ErrorStateMatcher. |
EDIT: EDIT2: Can you show me the mat-error displaying in the example? I'm testing this on Firefox, and cannot view the mat-error fields
My live site, showing missing mat-error field: |
Can you detail the version of Firefox you are using, and if you have any active extension that could be interfering |
I'll try to look into later |
I disabled all extensions and used a private window.
If there's any more information I can provide please don't hesitate to ask. Thank you for looking into this. |
Info as of June 2019: The error shows up as expected in Chrome, so no problem there. In Firefox however, it only shows up after the second time you open and cancel a file-open dialog. |
I am testing this with a reactive form and when using Validators.required the
<mat-error>
directive is not showing.This issue is also visible on the demo page under the
Input with validation: required and maxSize
sub section:https://merlosy.github.io/ngx-material-file-input/
(note that the mat-error fields never actually show up, try opening the dialog then closing without selecting a file, it should show the required error, but does not)
my code currently
template:
component:
I have tried this alternative method of getting errors:
*ngIf="topicForm.hasError('required', ['image'])"
(note the path variable)My other inputs on the same form use an
ErrorStateMatcher
defined like this:However
<ngx-mat-file-input>
cannot bind an errorStateMatcher. I don't know why form fields need errorStateMatchers now, and I'm not sure if its to do with the fact I use AngularMaterial or if it's to do with a new version of Angular.The text was updated successfully, but these errors were encountered: