Skip to content
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

FileInput does not display error on validation error #825

Closed
natrim opened this issue Jul 4, 2017 · 5 comments · Fixed by #2660
Closed

FileInput does not display error on validation error #825

natrim opened this issue Jul 4, 2017 · 5 comments · Fixed by #2660
Labels

Comments

@natrim
Copy link
Contributor

natrim commented Jul 4, 2017

ie. when i put required on FileInput
<FileInput source="files" label="common.file" accept={allowedFiles} validate={[required]}> <RestedFileField source="url" title="name" /> </FileInput>

the form is not sent but does not display any error

(same with ImageInput)

@fzaninotto fzaninotto added the bug label Jul 4, 2017
djhi added a commit that referenced this issue Aug 18, 2017
![screen](http://i.imgur.com/SMkhl1E.png)

Another way to tackle this would be check for error inside the FileInput. This would give us more control over the error message placement.

Haven't noticed any regressions on the other inputs

Fix #825
@quicklikerabbit
Copy link

Is this bug back? I seem to be having a similar issue; the form does not send but there is no displayed error message. Looking at the changes for #949 the errorText in Labeled.js seems to have been removed at some point.

@nik-lampe
Copy link
Contributor

Having the same issue.
Also should this even work for the maxSize prop? Or do I have to find another way of displaying that the selected file is too large?

@r9nick
Copy link

r9nick commented Aug 29, 2018

Having this issue too, it looks like meta or similar is not being passed around correctly? The validation function runs but the UI doesn't indicate an error (but the form will not submit). On the latest v2.2.2

@alexandremottet
Copy link

This problem is still present in the 2.4.0 version

@nosequeldeebee
Copy link

Duplicate of #6441

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants