fix the validation method
add some jquery events