Example #1
0
        public Dictionary <string, string> Validate(UserAccount model)
        {
            var modelErrors = new Dictionary <string, string>();

            if (!ValidateUserName(model))
            {
                modelErrors.Add(nameof(UserAccount.UserName), ValidationMessages.ExistsValidation("User Name"));
            }

            if (!ValidateFullName(model))
            {
                modelErrors.Add(nameof(UserAccount.FullName), ValidationMessages.ExistsValidation("Full Name"));
            }

            return(modelErrors);
        }