using validator for params