Welcome Guest, Not a member yet? Register   Sign In
remote function

I'm getting two more problems. One of which is the fact that for another POST request to be done the user has to refresh the form. And the last problem is that if the returned username is found it DOES NOT show the error message.

rules: {
            username: {
                minlength: 6,
                maxlength: 12,
                remote: {
                    type: 'post',
                    url: 'register/isUsernameAvailable',
                    data: {
                        'username': function(){ return $("#username").val(); }
                    dataType: 'json',
                    success: function(data) {
                        if (data.username == 'found')
                            message: {
                                username: 'The username is already in use!'

Theme © iAndrew 2016 - Forum software by © MyBB