Changes between Initial Version and Version 1 of Ticket #3807
- Timestamp:
- Jan 7, 2009, 3:57:16 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3807 – Description
initial v1 1 {{{2 1 It looks like the implementation of the remote method is supposed to 3 2 support custom messages from the server when using the remote method … … 5 4 6 5 This quick change fixes the problem (details below) 7 6 {{{ 8 7 From: 9 8 915 success: function(response) { … … 15 14 916 if ( response === true ) { 16 15 917 var submitted = validator.formSubmitted; 17 16 }}} 18 17 Because of type coercion, we can only see whether the response is 19 18 "truthy" or "falsey" from this line. If we take a look at line 924: 20 21 924 errors[element.name] = response || validator.defaultMessage 22 ( element, "remote" ); 23 19 {{{ 20 924 errors[element.name] = response || validator.defaultMessage( element, "remote" ); 21 }}} 24 22 It would seem to be checking the response and assigning that to the 25 23 error message if it is truthy, but it never can be because of the … … 37 35 field, this is a useful feature for systems that need to do 2 or more 38 36 distinct checks on a field at the server end. 39 }}}