Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-Side Validation Issue #409

Closed
Papa2k15 opened this issue Mar 15, 2016 · 1 comment
Closed

Server-Side Validation Issue #409

Papa2k15 opened this issue Mar 15, 2016 · 1 comment

Comments

@Papa2k15
Copy link

I am currently using the security module to do some server-side validation. I currently have an input text box that checks to see if a username has already been registered. I have noticed that whenever I am typing, once the server validates the input, it loses focus. I don't know if this is currently a issue because I tried to search the repository. When the element loses focus this sort of becomes a pain for a user because if they hit back space then the browser will go back in history. Also if the user types what they want their username to be it will stop them and they will have to click back onto the input box to continue typing, I am guessing that the server binds the keyup event to the input then tells it to lose focus on validate. I am currently using three different validations on this input, one for length, another for regular expression and the last is the server. I have tried to isolate and just use the server but I was still getting the same result. Here is an example of what my input looks like:

<input id="regusername" name="username" type="text" data-validation="length custom server" data-validation-url="/check_avaliable_username" data-validation-length="min6" data-validation-regexp="^[A-Za-z0-9_]+$" class="form-control" autocomplete="off" placeholder="Username"/>

Is this something that I did wrong?

@victorjonsson
Copy link
Owner

Duplicate of #436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants