Closed CMCDragonkai closed 10 years ago
I haven't used it as such, but I could see it working well.
Ruler is great at "business rule validation", which I'd consider a distinct problem from "input validation". It may be semantics, but I think it's a useful distinction to make :)
Consider the difference between "You must enter a valid phone number", and "You must enter either a cell phone number OR (an office phone number AND a home phone number)". The former would probably be best suited to a standard input validation library because it's a pattern matching problem. You could easily write (or copy/paste) a regex that validates all phone numbers you accept. The latter, however, would be a great fit for Ruler, because it's a complex set of requirements rather than just a pattern.
That flexibility is precisely what I'm looking for. Because often input validation has business rules that have logic extending from prior logic.
I'm thinking of integrating this into a input validation tool, most validation tools are usually based on configuration rather than code.