Exemple #1
0
        public Name f_Name(Name name)
        {
            Rejex           RJ = new Rejex();
            ErrorCollection error = new ErrorCollection();
            bool            Facces, Lacces;

            if (name.Ferst_Name == null)
            {
                name.Ferst_Name_error = error.error_box(11, false);
            }
            else
            {
                Facces = RJ.rejex(name.Ferst_Name, "^[ ا-ی]" + "{3,16}$");
                name.Ferst_Name_error = error.error_box(1, Facces);
            }
            if (name.Last_Name == null)
            {
                name.Last_Name_error = error.error_box(11, false);
            }
            else
            {
                Lacces = RJ.rejex(name.Last_Name, "^[ ا-ی]" + "{3,16}$");
                name.Last_Name_error = error.error_box(2, Lacces);
            }
            return(name);
        }
Exemple #2
0
        public Password f_password(Password pas)
        {
            Rejex           RJ    = new Rejex();
            ErrorCollection error = new ErrorCollection();

            if (pas.password == null)
            {
                pas.password_error = error.error_box(11, false);
            }
            else
            {
                bool acces;
                acces = RJ.rejex(pas.password, "^(?=^.{6,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$");
                pas.password_error = error.error_box(4, acces);
            }
            if (pas.ConfirmPassword == null)
            {
                pas.ConfirmPassword_error = error.error_box(11, false);
            }
            else
            {
                if (pas.password != pas.ConfirmPassword)
                {
                    pas.ConfirmPassword_error = error.error_box(5, false);
                }
                else
                {
                    pas.ConfirmPassword_error = null;
                }
            }
            return(pas);
        }
Exemple #3
0
        public Number f_Number(Number number)
        {
            Rejex           RJ    = new Rejex();
            ErrorCollection error = new ErrorCollection();
            bool            acces;

            if (number.number != null)
            {
                if (number.number.Length == 11)
                {
                    acces = RJ.rejex(number.number, "^09");
                    number.number_error = error.error_box(3, acces);
                }
                else
                {
                    number.number_error = error.error_box(3, false);
                }
            }
            else
            {
                number.number_error = error.error_box(11, false);
            }
            return(number);
        }