Blog.Logic.Core.UsersLogic.ValidateUser C# (CSharp) Method

ValidateUser() private method

private ValidateUser ( User user ) : Error
user User
return Error
        private Error ValidateUser(User user)
        {
            if (string.IsNullOrEmpty(user.UserName))
            {
                return new Error { Id = (int) Constants.Error.ValidationError,  Message = "Username cannot be empty" };
            }

            if (string.IsNullOrEmpty(user.IdentityId))
            {
                return new Error { Id = (int)Constants.Error.ValidationError, Message = "Identity Id cannot be empty" };
            }

            if (string.IsNullOrEmpty(user.FirstName))
            {
                return new Error { Id = (int)Constants.Error.ValidationError, Message = "First name cannot be empty" };
            }

            if (string.IsNullOrEmpty(user.LastName))
            {
                return new Error { Id = (int)Constants.Error.ValidationError, Message = "Last name cannot be empty" };
            }

            if (string.IsNullOrEmpty(user.EmailAddress))
            {
                return new Error { Id = (int)Constants.Error.ValidationError, Message = "Email address cannot be empty" };
            }

            if (user.BirthDate == DateTime.MinValue )
            {
                return new Error { Id = (int)Constants.Error.ValidationError, Message = "Birth date cannot be empty" };
            }

            if (!IsValidEmailAddress(user.EmailAddress))
            {
                return new Error { Id = (int)Constants.Error.ValidationError, Message = "Invalid email address" };
            }

            var tUser = _userRepository.Find(a => a.UserName == user.UserName, false).ToList();
            if (tUser.Count > 0)
            {
                return new Error { Id = (int)Constants.Error.ValidationError, Message = "Username already exists" };
            }

            return null;
        }