

Show HN: FieldVal.js – JavaScript Validation Library - marcuslongmuir
http://www.minoblog.io/fieldval/

======
cmpb
Looks useful! Could you provide an example of a field with validations
depending on the value (or validation status) of another field?

E.g., birth_month required if birth_year is set and after a certain year.

~~~
marcuslongmuir
How's this?:
[http://codepen.io/MarcusLongmuir/pen/rawRKR](http://codepen.io/MarcusLongmuir/pen/rawRKR)

You could also write a custom check that used the previous result as
documented here:
[http://www.fieldval.com/docs/fieldval/Check%20Functions](http://www.fieldval.com/docs/fieldval/Check%20Functions)

~~~
cmpb
That's pretty slick. I'll put this library in my back pocket for later.

------
scottdavies
Great demo. Looks very useful and easy to use.

