add validation functions for the user resource, not in use currently, need to refactor user api to make use of these