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 if (DataValidator.isNull(self.form["lastName"])): inputError["lastName"] = "Last Name can not be null" self.form["error"] = True if (DataValidator.isNull(self.form["login_id"])): inputError["login_id"] = "Login can not be null" 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.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"] = "mobileNumber can not be null" self.form["error"] = True if (DataValidator.isNull(self.form["role_Name"])): inputError["role_Name"] = "role_Name can not be null" self.form["error"] = True return self.form["error"]
def input_validation(self): super().input_validation() inputError = self.form["inputError"] if (DataValidator.isNull(self.form["login_id"])): inputError["login_id"] = "Login can not be null" self.form["error"] = True if (DataValidator.isNull(self.form["password"])): inputError["password"] = "******" self.form["error"] = True return self.form["error"]
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"])): inputError["login"] = "******" self.form["error"] = True else: if DataValidator.isemail(self.form['login']): inputError['login'] = "******" self.form['error'] = True if (DataValidator.isNull(self.form["password"])): inputError["password"] = "******" 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'] = "Invalid Mobile Number" self.form['error'] = True if (DataValidator.isNull(self.form["gender"])): inputError['gender'] = "Please Select Gender" self.form['error'] = True return self.form["error"]