From 05ea71016fd54a14159c72299c25efbdc2f177bc Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 12 Nov 2012 19:16:19 +0100 Subject: adding client side validations to the mix --- config/initializers/client_side_validations.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 config/initializers/client_side_validations.rb (limited to 'config/initializers') diff --git a/config/initializers/client_side_validations.rb b/config/initializers/client_side_validations.rb new file mode 100644 index 0000000..2c73fa3 --- /dev/null +++ b/config/initializers/client_side_validations.rb @@ -0,0 +1,14 @@ +# ClientSideValidations Initializer + +# Uncomment to disable uniqueness validator, possible security issue +# ClientSideValidations::Config.disabled_validators = [:uniqueness] + +# Uncomment the following block if you want each input field to have the validation messages attached. +ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| + unless html_tag =~ /^