Validations for views on js