{"id":1364,"date":"2022-08-30T15:15:55","date_gmt":"2022-08-30T15:15:55","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/13\/client-side-validations-on-heroku-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:15:55","modified_gmt":"2022-08-30T15:15:55","slug":"client-side-validations-on-heroku-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/client-side-validations-on-heroku-collection-of-common-programming-errors\/","title":{"rendered":"Client Side Validations on Heroku-Collection of common programming errors"},"content":{"rendered":"<p>I am using https:\/\/github.com\/bcardarella\/client_side_validations to validate my sign up form.<\/p>\n<p>I am validating the uniqueness of username and email in that form:<\/p>\n<pre><code>validates_uniqueness_of :username, :email, :case_sensitive =&gt; false\n<\/code><\/pre>\n<p>The database validations for uniqueness are taking place fine on my local machine. But when I try them on Heroku, they do not work.<\/p>\n<p>Edit:<\/p>\n<p>Here is the sign up form (I am using devise):<\/p>\n<pre><code> :user, :validate =&gt; true, :url =&gt; user_registration_path do |f| %&gt;\n     \"signupin-label span-2\" %&gt; \"signupin-field last\", :autocomplete =&gt; \"off\"%&gt;\n     \"signupin-label span-2\" %&gt; \"signupin-field last\", :autocomplete =&gt; \"off\" %&gt;\n     \"signupin-label span-2\" %&gt; \"signupin-field last\", :autocomplete =&gt; \"off\" %&gt;\n     \"signupin-label span-2\" %&gt; \"signupin-field last\", :autocomplete =&gt; \"off\" %&gt;\n     \"signUpButton\"  %&gt;\n\n<\/code><\/pre>\n<p>I am getting following error:<\/p>\n<p>rails.validations.js:154<\/p>\n<p>Uncaught TypeError: Object (?-mix:^(a-zA-Z*<em>?|<\/em>([a-zA-Z0-9]+_?)*)$) has no method &#8216;test&#8217;<\/p>\n<p>Can someone please guide?<\/p>\n<p>Thanks!<\/p>\n<ol>\n<li>\n<p>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.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-13 09:50:02. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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 =&gt; 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1364","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1364"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1364\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}