I use jQuery to validate my registration form, to day when I am test for finishing, I found some little bug (CMIIW). The case is like this :
For a username, I check the username on database if it exist or not. For example in my database I already have two username let say ‘admin1′ and ‘admin2′.
I did the code like example provided, let say we register with username ‘admin1′ or ‘admin2′ it will show an error that say the username already exist. Here the code :
reg_username: {
required: "Enter a username",
minlength: jQuery.format("Enter at least {0} characters"),
remote: jQuery.format("{0} is already in use")
},
The “{0}” will display the username we input, so when I type ‘admin1′ as my username it will display an error “admin1 is already in use”. Then when I type ‘admin2′ as my username it shuld be show an error “admin2 is already in use” but in fact, when I use ‘admin2′ as my username, it will display error ‘admin1 is already in use’. Kind a strange, didn’t solve it yet
Note
Just Updated to latest version 1.6 and it still get some bug but in different mode, seem I will eliminate {0} from the error code because it source of problem
)