ImageInput and FileInput required() is not working
What you were expecting:
When ImageInput has validate={[required()]} it should show the message in red
When FileInput has validate={[required()]} it should show the message
What happened instead:
ImageInput shows the message in gray (similar as helperText) FileInput doesn't show the message
Steps to reproduce:
- Open my fork: https://codesandbox.io/s/friendly-allen-7txqn2?file=/src/posts/PostCreate.tsx:2833-3028
- Navigate to Post Create page
- Fill other field like Title and press any of the save buttons
Related code:
Add validate={[required()]} to the FileInput tag Add
<ImageInput
source="imagefile"
label="Image"
validate={[required()]}
accept="image/*"
>
<ImageField source="src" />
</ImageInput>
Other information:

Environment
- React-admin version: 4.3.0
- React version: 17.0.0
- Browser: Chrome 100+
Thanks for the report! Marking this as a bug.
Duplicate of #6441
Duplicate of #6441
I'm not sure if it's a duplicate because I didn't use the maxSize property and this issue is related to React Admin 4.
I understand but the proposed outcome is the same as that issue and several other related ones. Fixing one will also address the others. We are asking the maintainers to validate the various properties available to FileInput and ImageInput which, as you note, they only partially did in #2660. I'd be happy to change this to "related to" if preferred.