Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: javascript/odesk/plugins/validation/rules/beneName.js
- ===================================================================
- --- javascript/odesk/plugins/validation/rules/beneName.js (revision 4178)
- +++ javascript/odesk/plugins/validation/rules/beneName.js (working copy)
- @@ -1,16 +1,16 @@
- (function($){
- -var _acce = '';
- var _matched = false;
- -$(document).ready(function() {
- - _acce = $('#account').val();
- -});
- -
- $.validator.addMethod('beneName', function(value, element, param) {
- + var acce = null;
- value = $.trim(value);
- + if (undefined != $(element).attr('account')) {
- + str = $.trim($(element).attr('account')).replace(/\D+/g, '');
- + acce = 0 < str.length ? str : acce;
- + }
- $.ajax({
- type: 'post',
- - url: '/api/finance/v1/compliance/' + _acce + '/' + value + '.json',
- + url: '/api/finance/v1/compliance/' + acce + '/' + value + '.json',
- success: function(data) {
- _matched = data.result;
- }
Add Comment
Please, Sign In to add comment