Serverside LiveValidation does not display a message
Reported by Nils | July 26th, 2010 @ 06:02 AM
The problem is that the displayMessageWhenEmpty parameter is not part of the options in LiveValidation 1.3.
The fix for me is:
diff --git a/apps/nitrogen/src/actions/action_validation_error.erl
b/apps/nitrogen/src/actions/action_validation_error.erl
index 833d469..ba1a8dc 100644
--- a/apps/nitrogen/src/actions/action_validation_error.erl +++
b/apps/nitrogen/src/actions/action_validation_error.erl @@ -11,7
+11,7 @@ render_action(Record) ->
Text = wf:js_escape(Record#validation_error.text),
[
wf:f("var v = new LiveValidation(obj('~s'), { onlyOnSubmit: true });", [TargetPath]),
-
wf:f("v.add(Validate.Custom, { against: Nitrogen.$return_false, failureMessage: \"~s\", displayMessageWhenEmpty: true });", [Text]),
-
wf:f("v.add(Validate.Custom, { against: Nitrogen.$return_false, failureMessage: \"~s\" }); v.displayMessageWhenEmpty=true;", [Text]), "v.validate();"
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Nitrogen Web Framework for Erlang