Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
Fix "validates_length_of :is" for jQuery adapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
htanata authored and augustl committed Sep 25, 2009
1 parent dd5fb17 commit 1c873e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/live_validations/adapters/jquery_validations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class JqueryValidations < LiveValidations::AdapterBase

if v.callback.options[:is]
length = v.callback.options[:is]
add_custom_rule(v, "lengthIs#{length}", "return value.length == #{length}", "Please enter exactly #{length} characters.")
add_custom_rule(v, attribute, "lengthIs#{length}", "return value.length == #{length}", "Please enter exactly #{length} characters.")
end
end

Expand Down

0 comments on commit 1c873e0

Please sign in to comment.