guillaumepotier/Parsley.js — pull request #153 by danbentley (2013-03-01 17:21:21+00:00)
Title: Added inlist validator

Users can define a comma-delimited with the `data-inlist` attribute.

Function added to `parsley.extend.js` to check whether submission value is contained within the defined list.

Included relevant unit tests to verify that:

- Values with spaces are correctly parsed and validated
- Lists with Single values are still correctly validated
- List items are correctly trimmed
- Lists with commas but no values fail validation.
- Empty lists always fail validation.