Fix validation issues of the language profile editor

pull/1958/head
LASER-Yi 2 years ago
parent a338de147e
commit 4826cb8487

@ -49,7 +49,7 @@ const ProfileEditForm: FunctionComponent<Props> = ({
const form = useForm({ const form = useForm({
initialValues: profile, initialValues: profile,
validate: { validate: {
name: (value) => value.length > 0, name: (value) => (value.length > 0 ? null : "Must have a name"),
items: (value) => items: (value) =>
value.length > 0 ? null : "Must contain at lease 1 language", value.length > 0 ? null : "Must contain at lease 1 language",
}, },

Loading…
Cancel
Save