PHP Classes

File: examples/examplefile.php

Recommend this page to a friend!
  Classes of Jorge Castro  >  PHP Validation One Library  >  examples/examplefile.php  >  Download  
File: examples/examplefile.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Validation One Library
Fetch and validate forms and request values
Author: By
Last change: Update of examples/examplefile.php
Date: 2 years ago
Size: 737 bytes


Class file image Download
<form method="post" enctype="multipart/form-data">
    <input type="file" class="custom-file-input" name="frm_image" id="frm_image"><br>
    <button type="submit" class="btn btn-primary" name="button" value="submit">Submit</button>


use eftec\ValidationOne;


$validaton=new ValidationOne("frm_");

ifFailThenDefault(false) // if fails then we show the same value however it triggers an error
condition("image","The file is not a right image")
condition("ext","The file is incorrect",['jpg','png'])
condition("req","this value is required")


For more information send a message to info at phpclasses dot org.