now validates if gui order is a number (#338)
This commit is contained in:
parent
32a3ff150b
commit
4edcf233f3
2 changed files with 14 additions and 2 deletions
|
@ -284,12 +284,23 @@ export const ClientScopeForm = () => {
|
|||
/>
|
||||
}
|
||||
fieldId="kc-gui-order"
|
||||
helperTextInvalid={t("shouldBeANumber")}
|
||||
validated={
|
||||
errors.attributes && errors.attributes["gui_order"]
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
ref={register}
|
||||
type="number"
|
||||
ref={register({ pattern: /^([0-9]*)$/ })}
|
||||
type="text"
|
||||
id="kc-gui-order"
|
||||
name="attributes.gui_order"
|
||||
validated={
|
||||
errors.attributes && errors.attributes["gui_order"]
|
||||
? ValidatedOptions.error
|
||||
: ValidatedOptions.default
|
||||
}
|
||||
/>
|
||||
</FormGroup>
|
||||
<ActionGroup>
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
"displayOnConsentScreen": "Display on consent screen",
|
||||
"consentScreenText": "Consent screen text",
|
||||
"guiOrder": "Display Order",
|
||||
"shouldBeANumber": "Should be a number",
|
||||
"chooseAMapperType": "Choose a mapper type",
|
||||
"predefinedMappingDescription": "Choose one of the predefined mappings from this table",
|
||||
"mappingTable": "Table with predefined mapping",
|
||||
|
|
Loading…
Reference in a new issue