javascript

fixed validations