Added isValid form check