Skip to content

Commit f5ace25

Browse files
committed
fix(admin-ui): add validation for finish button
1 parent 0a71edc commit f5ace25

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

admin-ui/plugins/auth-server/components/Clients/ClientWizardForm.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ function ClientWizardForm({
7575
function toggle() {
7676
setModal(!modal)
7777
}
78+
function validateFinish(){
79+
if(formRef && formRef.current && formRef.current.values.redirectUris.length > 0){
80+
toggle()
81+
}else{
82+
toast.info("Please add atleast 1 redirect URL");
83+
}
84+
}
7885
function setId(index) {
7986
return sequence[index]
8087
}
@@ -461,7 +468,7 @@ function ClientWizardForm({
461468
type="button"
462469
color={`primary-${selectedTheme}`}
463470
className="px-4 ml-2"
464-
onClick={toggle}
471+
onClick={validateFinish}
465472
style={applicationStyle.buttonStyle}
466473
>
467474
{t('actions.finish')}

0 commit comments

Comments
 (0)