Passing additional dynamic data to the remote validator
See original GitHub issueIt 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:
- Created 9 years ago
- Comments:10 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nsamuels0510 Check http://parsleyjs.org/doc/index.html#remote-events
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!