Skip to content

Commit

Permalink
fix: add condition that removes validate of hidden fields (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
bocembocem authored Mar 12, 2024
1 parent 3ea1d38 commit bbd98e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/core/components/Form/Controller/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const getValidate = <
}: GetValidateParams<SpecType>) => {
let validate: (value?: Value) => ValidateError = () => undefined;

if (isCorrectConfig(config) && isCorrectSpec(spec)) {
if (isCorrectConfig(config) && isCorrectSpec(spec) && !spec.viewSpec.hidden) {
const {validators} = config[spec.type] as unknown as
| TypeConfig<DirtyValue, Value, SpecType>
| Record<string, undefined>;
Expand Down

0 comments on commit bbd98e9

Please sign in to comment.