Skip to content

Commit

Permalink
fix: prevent field validation for hidden or exclude fields
Browse files Browse the repository at this point in the history
  • Loading branch information
cafadev committed Jul 26, 2024
1 parent 54bef58 commit 1fb66b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/forms/capabilities/validate-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export class ValidateFormHandler implements IValidateFormHandler {
const isValid = Object.values(fields).every((field) => {
const command = new ValidateFieldRulesCommand(field, options)

if (field.hidden || field.exclude)
return true

const result = this.validateFieldRules.execute(command)
return result === true
})
Expand Down

0 comments on commit 1fb66b3

Please sign in to comment.