AlexJPotter / fluentvalidation-ts

A TypeScript-first library for building strongly-typed validation rules
Apache License 2.0
87 stars 6 forks source link

Date Validation #34

Open chandrubk opened 1 year ago

chandrubk commented 1 year ago

How Can I do the Date Validations? I didn't find any references

bohoffi commented 1 year ago

@chandrubk with the current rules you could utilize the number rules with ruleForTransformed and Date.getTime()

AlexJPotter commented 8 months ago

Hi @chandrubk - it's a good point, I'll have a think about whether there are some built-in validators we can support for Date objects. As a workaround for now you could use the suggestion from @bohoffi or make use of .must to define your own custom rules 😃