Field Validations Add validation on fields

By default, field validations are generated as per the data type of field in database table. But you can also define extra validation on field, like max length, min length, url, equal to etc.

  
                            $pdocrud = new PDOCrud();
                            $pdocrud->formFields(array("user_name","email","password","confirm_password","phone"));                                    
                            $pdocrud->fieldValidationType("user_name", "data-minlength", "10", "Please enter atleast 10 characters");
                            $pdocrud->fieldValidationType("password", "data-match", "confirm_password", "Password and confirm password not matching");
                            $pdocrud->formStaticFields("confirm_password", "text");
                            echo $pdocrud->dbTable("users")->render("insertform");
                            

Field validation using PDOCrud


Deprecated: Required parameter $field follows optional parameter $op in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 924

Deprecated: Required parameter $task follows optional parameter $op in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 924

Deprecated: Required parameter $totalrecords follows optional parameter $page in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrudHelper.php on line 191

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3532

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3543

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 3588

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4221

Warning: Trying to access array offset on value of type null in /home/javad/domains/javadfk.ir/public_html/pdocrud/script/classes/PDOCrud.php on line 4230