translation of some js validations