added JS validations