Skip to content

Commit

Permalink
Fixed email address validation message
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 11, 2021
1 parent e932b94 commit 7744a80
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ui/src/app/metadata/wizard/MetadataWizardForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@ export function MetadataWizardForm ({ metadata, definition, schema, current, onC
const onSubmit = () => {};

const transformErrors = (errors) => {
return errors.filter(e => invisErrors.indexOf(e.name) === -1);
let list = [
...errors.filter(e => invisErrors.indexOf(e.name) === -1)
].map(e => {
if (e.name === 'pattern' && e.property.includes('email')) {
e.message = 'message.valid-email';
}
return e;
});

return list;
}

const onFormChange = (form) => {
Expand Down

0 comments on commit 7744a80

Please sign in to comment.