Exemplo n.º 1
0
        /// <summary>
        /// Validate Password Field
        /// </summary>
        /// <returns>True/False</returns>
        private bool PasswordValidation()
        {
            if (PasswordText != string.Empty)
            {
                #region Validation Conditions

                bool passwordValidation = PasswordText.Length >= 7 && PasswordText.Length <= 50 && !(PasswordText.Contains(" "));

                #endregion

                #region Field State Updation

                PasswordState = passwordValidation ? FieldState.ValidField : FieldState.InvalidField;

                #endregion

                return(passwordValidation);
            }

            PasswordState = FieldState.ValidField;
            return(true);
        }