add input validation

This commit is contained in:
dklimpel 2021-08-30 16:28:33 +02:00
parent 730c412727
commit 6d78f7b570

View File

@ -37,6 +37,7 @@ import {
DeleteButton,
SaveButton,
regex,
required,
useTranslate,
Pagination,
CreateButton,
@ -263,8 +264,12 @@ export const UserCreate = props => (
</ArrayInput>
<ArrayInput source="external_ids" label="synapseadmin.users.tabs.sso">
<SimpleFormIterator>
<TextInput source="auth_provider" />
<TextInput source="external_id" label="resources.users.fields.id" />
<TextInput source="auth_provider" validate={required()} />
<TextInput
source="external_id"
label="resources.users.fields.id"
validate={required()}
/>
</SimpleFormIterator>
</ArrayInput>
</SimpleForm>
@ -346,10 +351,11 @@ export const UserEdit = props => {
>
<ArrayInput source="external_ids" label={false}>
<SimpleFormIterator>
<TextInput source="auth_provider" />
<TextInput source="auth_provider" validate={required()} />
<TextInput
source="external_id"
label="resources.users.fields.id"
validate={required()}
/>
</SimpleFormIterator>
</ArrayInput>