Live data from Hacker News

Show HN: FieldVal.js – JavaScript Validation Library

minoblog.io

1–5 of 5 posts

Re: Show HN: FieldVal.js – JavaScript Validation Library

#4
post #3

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.

How's this?: 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

Re: Show HN: FieldVal.js – JavaScript Validation Library

#5
post #3

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.

How's this?: 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

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