You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentaiton is ambiguous about the difference between `type and $$type. For example this test on enum:
it("allows enums in a nested schema",()=>{constcheck=v.compile({type: "object",value: {$$type: "enum",values: ["a","b","c"]}});expect(check({value: "a"})).toBe(true);expect(check({value: "z"})).toBe(false);})
fails with the following result:
Cannotreadpropertiesofundefined(reading'join')
However this
it("allows enums in a nested schema",()=>{constcheck=v.compile({type: "object",value: {type: "enum",values: ["a","b","c"]}});expect(check({value: "a"})).toBe(true);expect(check({value: "z"})).toBe(false);})
falis with
Expected: true
Received: [{"actual": undefined,"field": "type","message": "The 'type' field is required.","type": "required"}]
this means that $$type and type are not interchangable. $$type triggers the enum rule to be run, but the schema of the rule is changed causing it to throw an exception (i have a fix for that if needed), but type will not cause the rule to be run at all.
What is the expected behavior?
The text was updated successfully, but these errors were encountered:
The documentaiton is ambiguous about the difference between `type and $$type. For example this test on enum:
fails with the following result:
However this
falis with
this means that
$$type
andtype
are not interchangable.$$type
triggers the enum rule to be run, but the schema of the rule is changed causing it to throw an exception (i have a fix for that if needed), buttype
will not cause the rule to be run at all.What is the expected behavior?
The text was updated successfully, but these errors were encountered: