Skip to content

Instantly share code, notes, and snippets.

@matthewbeta
Last active November 8, 2016 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewbeta/700713eeeb6444d206d5 to your computer and use it in GitHub Desktop.
Save matthewbeta/700713eeeb6444d206d5 to your computer and use it in GitHub Desktop.
<input type="text" data-parsley-multiple="3" data-parsley-error-message="Please try again" />
/*...*/
<script type="text/javascript">
window.ParsleyValidator
.addValidator('multipleof', function (value, requirement) {
return 0 === value % requirement;
}, 32)
.addMessage('en', 'multipleof', 'This value should be a multiple of %s');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment