Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-2179 (pull request #553)
Browse files Browse the repository at this point in the history
Fixed validation messages

Approved-by: Bill Smith
Approved-by: Jonathan Johnson
  • Loading branch information
rmathis authored and Jonathan Johnson committed Nov 1, 2021
2 parents cc392f1 + ef8ed60 commit d357f94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/src/app/metadata/wizard/MetadataProviderTypeSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export function MetadataProviderTypeSelector({ type, types = [], children}) {

const providerNames = data.map(p => p.name);

console.log(errors);

return (
<>{showSelector ?
<>
Expand Down Expand Up @@ -90,8 +92,8 @@ export function MetadataProviderTypeSelector({ type, types = [], children}) {
unique: v => !(providerNames.indexOf(v) > -1)
}})} />
<Form.Text className={errors.name ? 'text-danger' : 'text-muted'}>
{errors?.name?.unique && <Translate value={`message.must-be-unique`} />}
{errors?.name?.required && <Translate value={`message.service-resolver-name-required`} />}
{errors?.name?.type === 'unique' && <Translate value={`message.must-be-unique`} />}
{errors?.name?.type === 'required' && <Translate value={`message.service-resolver-name-required`} />}
</Form.Text>
</Form.Group>
<Form.Group>
Expand Down

0 comments on commit d357f94

Please sign in to comment.