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
expect(check("$12,222.2")).toEqual([{"actual": "$12,222.2","field": undefined,"message": "The '' must be a valid currency format","type": "currency"}]);
59
59
});
60
60
it("should work correctly with supplied regex pattern",()=>{
expect(check({address: "London",age: "22",name: "John",surname: "Doe"})).toEqual([{"type":"number","message":"The 'age' field must be a number.","field":"age","actual":"22"},{"type":"objectStrict","message":"The object '' contains forbidden keys: 'address'.","expected":"age, name, surname","actual":"address"}]);
101
101
});
102
+
103
+
it("issue #303 (nullable with shorthard format)",()=>{
expect(v.validate(-1,{$$root: true,type: "number",min: 0})).toEqual([{actual: -1,expected: 0,field: undefined,message: "The '' field must be greater than or equal to 0.",type: 'numberMin'}]);
39
+
expect(v.validate(-1,{$$root: true,type: "number",min: 0})).toEqual([{actual: -1,expected: 0,field: undefined,message: "The '' field must be greater than or equal to 0.",type: "numberMin"}]);
0 commit comments