Skip to content

Commit

Permalink
Fix Input validate usage for ReferenceInput
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Aug 7, 2024
1 parent 5cd3ecb commit 83a54f5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const PostEdit = () => (
<Edit>
<SimpleForm>
<TextInput readOnly source="id" />
<ReferenceInput label="User" source="userId" reference="users" validate={[required()]}>
<SelectInput optionText="name" />
<ReferenceInput label="User" source="userId" reference="users">
<SelectInput optionText="name" validate={[required()]} />
</ReferenceInput>
<TextInput source="title" label="Post title" validate={[required()]} />
<TextInput multiline source="body" defaultValue="Lorem Ipsum" />
Expand Down
4 changes: 2 additions & 2 deletions doc/4.16/Inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const PostEdit = () => (
<Edit>
<SimpleForm>
<TextInput readOnly source="id" />
<ReferenceInput label="User" source="userId" reference="users" validate={[required()]}>
<SelectInput optionText="name" />
<ReferenceInput label="User" source="userId" reference="users">
<SelectInput optionText="name" validate={[required()]} />
</ReferenceInput>
<TextInput source="title" label="Post title" validate={[required()]} />
<TextInput multiline source="body" defaultValue="Lorem Ipsum" />
Expand Down
4 changes: 2 additions & 2 deletions doc/5.0/Inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const PostEdit = () => (
<Edit>
<SimpleForm>
<TextInput readOnly source="id" />
<ReferenceInput label="User" source="userId" reference="users" validate={[required()]}>
<SelectInput optionText="name" />
<ReferenceInput label="User" source="userId" reference="users">
<SelectInput optionText="name" validate={[required()]} />
</ReferenceInput>
<TextInput source="title" label="Post title" validate={[required()]} />
<TextInput multiline source="body" defaultValue="Lorem Ipsum" />
Expand Down
4 changes: 2 additions & 2 deletions doc/5.1/Inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const PostEdit = () => (
<Edit>
<SimpleForm>
<TextInput readOnly source="id" />
<ReferenceInput label="User" source="userId" reference="users" validate={[required()]}>
<SelectInput optionText="name" />
<ReferenceInput label="User" source="userId" reference="users">
<SelectInput optionText="name" validate={[required()]} />
</ReferenceInput>
<TextInput source="title" label="Post title" validate={[required()]} />
<TextInput multiline source="body" defaultValue="Lorem Ipsum" />
Expand Down

0 comments on commit 83a54f5

Please sign in to comment.