Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

knmitov's avatar

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'
                    }
                }
            }
0 likes
2 replies
kreitje's avatar

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.

Please or to participate in this conversation.