News for hackers. Stuff that matters.
Re:Show HN: validate.js - lightweight JavaScript form valida... by oinksoft on Monday October 17, 2011 @02:24PM (#3121730)
I think you should have params to the validators, specifically for the regex case, in which the callback_ approach, with registration and such, is quite onerous.

  {
      rules: 'regex',
      params: {
          regex: [/abc/]
      }
  }
or,

  {
      rules: 'regex:^foo'
  }
Re:Show HN: validate.js - lightweight JavaScript form valida... by rickharrison on Monday October 17, 2011 @02:25PM (#3121739)
I like this idea a lot. I chose to start out with the callback_ approach due to trying to mimic the CodeIgniter API. However, this would be much easier especially for just a regex.