make javascript code to check validation for joinForm