Skip to content

Migrate Azure AD auth provider to the useFormValidation composable #17791

@rak-phillip

Description

@rak-phillip

shell/edit/auth/azuread.vue already has field-level validation using the form validation mixin. Migrate this form to the useFormValidation composable.

Recommended approach

Replace the form validation mixin with useFormValidation in setup(). Most of the current rule sets migrate directly because formRulesGenerator already provides required and url rules. Extra rules can expressed as functions in the extraRules argument.

Acceptance criteria

  • The form validation mixin is removed from the component
  • useFormValidation is used in setup() with the existing rule sets
  • Custom validators (applicationSecretRequired, endSessionEndpointRequiredAndValid) are expressed as extraRules
  • isFormValid from the composable drives :validation-passed on CruResource
  • Inline error tooltips continue to appear on blur for all validated fields
  • The Enable button remains disabled while required fields are empty or contain invalid URLs
  • Existing unit tests in shell/edit/auth/__tests__/azuread.test.ts continue to pass

Metadata

Metadata

Assignees

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions