Client Side Validations on Heroku-Collection of common programming errors
I am using https://github.com/bcardarella/client_side_validations to validate my sign up form.
I am validating the uniqueness of username and email in that form:
validates_uniqueness_of :username, :email, :case_sensitive => false
The database validations for uniqueness are taking place fine on my local machine. But when I try them on Heroku, they do not work.
Edit:
Here is the sign up form (I am using devise):
:user, :validate => true, :url => user_registration_path do |f| %>
"signupin-label span-2" %> "signupin-field last", :autocomplete => "off"%>
"signupin-label span-2" %> "signupin-field last", :autocomplete => "off" %>
"signupin-label span-2" %> "signupin-field last", :autocomplete => "off" %>
"signupin-label span-2" %> "signupin-field last", :autocomplete => "off" %>
"signUpButton" %>
I am getting following error:
rails.validations.js:154
Uncaught TypeError: Object (?-mix:^(a-zA-Z*?|([a-zA-Z0-9]+_?)*)$) has no method ‘test’
Can someone please guide?
Thanks!
-
I found the issue. I was not validating the format of username on the client side and that was causing this error. Thanks for your help.
Originally posted 2013-11-13 09:50:02.