Validate name format in private method