Refactored UserValidation class checkName method