Skip to content

Commit

Permalink
[RFR] FileInput - Display validation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Dec 13, 2018
1 parent d3f468c commit c9017a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/ra-ui-materialui/src/input/FileInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,13 @@ export class FileInput extends Component {
isRequired,
label,
maxSize,
meta,
minSize,
multiple,
resource,
source,
options = {},
translate,
...rest
} = this.props;

Expand Down Expand Up @@ -205,6 +207,11 @@ export class FileInput extends Component {
</div>
)}
</span>
{meta && meta.error &&
<FormHelperText>
{translate(meta.error)}
</FormHelperText>
}
</Labeled>
);
}
Expand Down

0 comments on commit c9017a3

Please sign in to comment.