adding validations to js dialect