Esempio n. 1
0
    def input_validation(self):
        super().input_validation()
        inputError = self.form["inputError"]
        if (DataValidator.isNull(self.form["firstName"])):
            inputError["firstName"] = " First Name can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form["firstName"]):
                inputError["firstName"] = "Name contains only alphabets"
                self.form["error"] = True

        if (DataValidator.isNull(self.form["lastName"])):
            inputError["lastName"] = "Last Name can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form["lastName"]):
                inputError["lastName"] = "Name contains only alphabets"
                self.form["error"] = True
        if (DataValidator.isNull(self.form["collegeName"])):
            inputError["collegeName"] = "Last Name can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form["collegeName"]):
                inputError["collegeName"] = "Name contains only alphabets"
                self.form["error"] = True
        if (DataValidator.isNull(self.form["dob"])):
            inputError["dob"] = "DOB can not be null"
            self.form["error"] = True

        if (DataValidator.isNull(self.form["mobileNumber"])):
            inputError["mobileNumber"] = "Mobile Number can not be null"
            self.form["error"] = True
        else:
            if DataValidator.ismobilecheck(self.form["mobileNumber"]):
                inputError[
                    "mobileNumber"] = "Mobile number contains only digits"
                self.form["error"] = True

        if (DataValidator.isNull(self.form["email"])):
            inputError["email"] = "Email ID can not be null"
            self.form["error"] = True
        else:
            if (DataValidator.isemail(self.form['email'])):
                inputError['email'] = "Please Enter Email Address"
                self.form['error'] = True

        if (DataValidator.isNull(self.form["college_ID"])):
            inputError["college_ID"] = "Please select College name"
            self.form["error"] = True

        return self.form["error"]
Esempio n. 2
0
    def input_validation(self):
        super().input_validation()
        inputError = self.form["inputError"]
        if (DataValidator.isNull(self.form["collegeName"])):
            inputError["collegeName"] = "Name can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form["collegeName"]):
                inputError["collegeName"] = "Name contains only alphabets"
                self.form["error"] = True

        if (DataValidator.isNull(self.form["collegeAddress"])):
            inputError["collegeAddress"] = "Address can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form["collegeAddress"]):
                inputError["collegeAddress"] = "Name contains only alphabets"
                self.form["error"] = True

        if (DataValidator.isNull(self.form["collegeState"])):
            inputError["collegeState"] = "State can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form["collegeState"]):
                inputError["collegeState"] = "Name contains only alphabets"
                self.form["error"] = True

        if (DataValidator.isNull(self.form["collegeCity"])):
            inputError["collegeCity"] = "City can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form["collegeCity"]):
                inputError["collegeCity"] = "city contains only alphabets"
                self.form["error"] = True

        if (DataValidator.isNull(self.form["collegePhoneNumber"])):
            inputError["collegePhoneNumber"] = "Phone Number can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isphonecheck(self.form["collegePhoneNumber"]):
                inputError["collegePhoneNumber"] = "Invalid Phone Number"
                self.form["error"] = True

        return self.form["error"]
Esempio n. 3
0
 def input_validation(self):
     super().input_validation()
     inputError = self.form["inputError"]
     if (DataValidator.isNull(self.form["name"])):
         inputError["name"] = "Name can not be null"
         self.form["error"] = True
     else:
         if DataValidator.isaplhacheck(self.form['name']):
             inputError['name'] = "Name contains only alphabets"
             self.form['error'] = True
     if (DataValidator.isNull(self.form["description"])):
         inputError["description"] = "Description can not be null"
         self.form["error"] = True
     return self.form["error"]
Esempio n. 4
0
    def input_validation(self):
        super().input_validation()
        inputError = self.form["inputError"]
        if (DataValidator.isNull(self.form["firstName"])):
            inputError["firstName"] = "Name can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form['firstName']):
                inputError['firstName'] = "First Name contains only alphabets"
                self.form['error'] = True

        if (DataValidator.isNull(self.form["lastName"])):
            inputError["lastName"] = "Last Name can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isaplhacheck(self.form['lastName']):
                inputError['lastName'] = "Last Name contains only alphabet"
                self.form["error"] = True

        if (DataValidator.isNull(self.form["login_id"])):
            inputError["login_id"] = "Login can not be null"
            self.form["error"] = True
        else:
            if DataValidator.isemail(self.form['login_id']):
                inputError['login_id'] = "Please Enter Email Address"
                self.form['error'] = True

        if (DataValidator.isNull(self.form["password"])):
            inputError["password"] = "******"
            self.form["error"] = True

        if (DataValidator.isNull(self.form["confirmpassword"])):
            inputError["confirmpassword"] = "******"
            self.form["error"] = True

        if (DataValidator.isNotNull(self.form["confirmpassword"])):
            if (self.form["password"] != self.form["confirmpassword"]):
                inputError["confirmpassword"] = "******"
                self.form["error"] = True

        if (DataValidator.isNull(self.form["dob"])):
            inputError["dob"] = "DOB can not be null"
            self.form["error"] = True

        if (DataValidator.isNull(self.form["address"])):
            inputError["address"] = "Address can not be null"
            self.form["error"] = True

        if (DataValidator.isNull(self.form["mobilenumber"])):
            inputError["mobilenumber"] = "Mobile Number can not be null"
            self.form["error"] = True
        else:
            if DataValidator.ismobilecheck(self.form['mobilenumber']):
                inputError['mobilenumber'] = "Invalid Mobile Number"
                self.form['error'] = True

        if (DataValidator.isNull(self.form["gender"])):
            inputError['gender'] = "Please Select Gender"
            self.form['error'] = True

        if (DataValidator.isNull(self.form["role_Id"])):
            inputError['role_Id'] = "Please Select Role"
            self.form['error'] = True

        return self.form["error"]