You don't. That is the point of CSRF tokens. They are there to protect against remote calls so you need to turn it off to test that.
Feb 2, 2015
2
Level 18
TokenMismatchException
Hi there,
I'm playing around with BootstrapValidator http://formvalidation.io/validators/remote/ , but I keep getting this TokenMismatchException error. I do understand that the hidden's field value needs to be sent as well but how do I include it as a remote parameter ? I even tried to use excluded: ':hidden' but that did not do the trick. Any help would be appreciated !
email: {
validators: {
notEmpty: {
message: 'Email is required and cannot be empty'
},
emailAddress: {
message: 'The input is not a valid email address'
},
remote: {
type: 'POST',
url: '/clients',
delay: 2000,
data: {
type: email
},
message: 'The email is not available'
}
}
}
Please or to participate in this conversation.