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