create user factory and validation check