added max length check (#506)

fixing: #317
This commit is contained in:
Erik Jan de Wit 2021-04-12 21:55:38 +02:00 committed by GitHub
parent 42dae904d0
commit ceabb4f690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,9 +155,22 @@ export const ClientScopeForm = () => {
/> />
} }
fieldId="kc-description" fieldId="kc-description"
validated={
errors.description
? ValidatedOptions.error
: ValidatedOptions.default
}
helperTextInvalid={t("common:maxLength", { length: 255 })}
> >
<TextInput <TextInput
ref={register} ref={register({
maxLength: 255,
})}
validated={
errors.description
? ValidatedOptions.error
: ValidatedOptions.default
}
type="text" type="text"
id="kc-description" id="kc-description"
name="description" name="description"