Add javascript and rails validations