question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing additional dynamic data to the remote validator

See original GitHub issue

It seems to me that we can not pass a dynamic value via ajax to the remote validator, is that correct? For example, in the following code …

data-parsley-remote-options='{ "type": "POST", "dataType": "jsonp", "data": { "token": "value" } }'

… the “value” of the token can be a literal (such as ‘myparam’), but can not be the value of another form element (such as $(‘user’).val()).

Using the javascript method I tried making the “value” a function, but was unsuccessful there too.

Is there a way to pass a dynamic value? Its important for a remote validator.

Here are a couple of related stackoverflow questions:

http://stackoverflow.com/questions/23690448/parsley-remote-and-additional-parameters http://stackoverflow.com/questions/23675442/remote-validation-for-a-field-which-depends-on-others

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

0reactions
nsamuels0510commented, Apr 5, 2016

Sorry! I only asked on this board because all stackoverflow questions about passing extra dynamic parameters with parsley remote pointed to a lot of these issues that are all marked closed with no answers or coding examples! Thanks anyway!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sending additional static parameter with jquery remote ...
In case you want to send dynamic parameters, instead of static: $("#edit_info").validate({ debug: false, rules: { name: { required: true, ...
Read more >
remote validator - FormValidation
If you want to use dynamic data, then use a callback as following: data: function() { ... import remote from 'formvalidation/dist/es6/validators/remote';.
Read more >
How to dynamically apply validation rules at runtime with ASP ...
One way, off the top of my head, is to use remote validation. Send the remote service end point the a ValidationKey along...
Read more >
Remote Validation in Razor Pages
Remote Validation is a technique that uses client side script to validate user input on the server without posting the entire form.
Read more >
Dynamic elements and remote rule validation - jQuery Forum
I just use the rules-method to add the validations for each new element added in the form, like the bellow example. $('input.email', $groupItem) ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found