@@ -736,8 +736,7 @@ describe('ValidationRuleSchema (Discriminated Union)', () => {
736736 type : 'custom' as const ,
737737 name : 'custom_business_rule' ,
738738 message : 'Custom validation failed' ,
739- field : 'business_field' ,
740- validatorFunction : 'validateBusinessRule' ,
739+ handler : 'validateBusinessRule' ,
741740 } ;
742741
743742 expect ( ( ) => ValidationRuleSchema . parse ( customValidation ) ) . not . toThrow ( ) ;
@@ -748,8 +747,7 @@ describe('ValidationRuleSchema (Discriminated Union)', () => {
748747 type : 'custom' as const ,
749748 name : 'complex_validation' ,
750749 message : 'Validation failed' ,
751- field : 'data' ,
752- validatorFunction : 'complexValidator' ,
750+ handler : 'complexValidator' ,
753751 params : {
754752 threshold : 100 ,
755753 mode : 'strict' ,
@@ -764,7 +762,7 @@ describe('ValidationRuleSchema (Discriminated Union)', () => {
764762 type : 'custom' as const ,
765763 name : 'record_level_check' ,
766764 message : 'Record validation failed' ,
767- validatorFunction : 'validateEntireRecord' ,
765+ handler : 'validateEntireRecord' ,
768766 } ;
769767
770768 expect ( ( ) => ValidationRuleSchema . parse ( validation ) ) . not . toThrow ( ) ;
@@ -1058,7 +1056,7 @@ describe('ValidationRuleSchema (Discriminated Union)', () => {
10581056 type : 'custom' ,
10591057 name : 'business_logic' ,
10601058 message : 'Business logic validation failed' ,
1061- validatorFunction : 'validateBusinessRules' ,
1059+ handler : 'validateBusinessRules' ,
10621060 } ,
10631061 {
10641062 type : 'conditional' ,
@@ -1212,8 +1210,7 @@ describe('ValidationRuleSchema - Edge Cases and Null Handling', () => {
12121210 type : 'custom' as const ,
12131211 name : 'custom_validation' ,
12141212 message : 'Validation failed' ,
1215- field : undefined , // Optional for record-level validation
1216- validatorFunction : 'validateRecord' ,
1213+ handler : 'validateRecord' ,
12171214 params : undefined ,
12181215 } ;
12191216
@@ -1225,7 +1222,7 @@ describe('ValidationRuleSchema - Edge Cases and Null Handling', () => {
12251222 type : 'custom' as const ,
12261223 name : 'custom_validation' ,
12271224 message : 'Validation failed' ,
1228- validatorFunction : 'validateRecord' ,
1225+ handler : 'validateRecord' ,
12291226 params : { } ,
12301227 } ;
12311228
@@ -1339,7 +1336,7 @@ describe('ValidationRuleSchema - Type Coercion Edge Cases', () => {
13391336 type : 'custom' as const ,
13401337 name : 'custom_test' ,
13411338 message : 'Test' ,
1342- validatorFunction : 'validate' ,
1339+ handler : 'validate' ,
13431340 params,
13441341 } ;
13451342
0 commit comments