Download the PHP package jasonsarino/php-formvalidator without Composer

On this page you can find all versions of the php package jasonsarino/php-formvalidator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-formvalidator

PHP Formvalidator

This library use to validate and sanitize form entry with sanitization to avoid sql injection and easy to set rules for specific fields.

Install

Requires PHP 7.1 or newer.

Usage

Include Sanitizer and FormValidator Class

Fetch data from $_POST form

assume that we have data from $_POST data

Reset data array for multiple form entries

(Optional) Use to reset array to FormValidator class f you have multple form entries

Set and Hold $_POST into data array variable

Set Rules ro fields

Validate data array variable with rules

Get the result from validateData method

return bolean

Display Error

Complete Usage

Rule Reference

The following is a list of all the native rules that are available to use:

Rule Parameter Description Example
required No Returns FALSE if the form element is empty.
alpha No Returns FALSE if the form element contains anything other than alphabetical characters.
alphaS No Returns FALSE if the form element contains anything other than alpha characters or spaces. Should be used after trim to avoid spaces at the beginning or end.
alphaNum No Returns FALSE if the form element contains anything other than alpha-numeric characters.
alphaNumS No Returns FALSE if the form element contains anything other than alpha-numeric characters or spaces. Should be used after trim to avoid spaces at the beginning or end.
alphaNumSymbol No Returns FALSE if the form element contains anything other than alpha-numeric-symbol characters. Should be used after trim to avoid spaces at the beginning or end.
alphaNumSymbolS No Returns FALSE if the form element contains anything other than alpha-numeric-symbol characters or spaces. Should be used after trim to avoid spaces at the beginning or end.
dateFormat No Returns FALSE if the form element contains anything other than date format.
dateTimeFormat No Returns FALSE if the form element contains anything other than date and time format.
email No Returns FALSE if the form element does not contain a valid email address.
ipAddress No Returns FALSE if the supplied IP address is not valid. Accepts an optional parameter of ‘ipv4’ or ‘ipv6’ to specify an IP format.
maxLen Yes Returns FALSE if the form element is longer than the parameter value. maxLen[12]
num No Returns FALSE if the form element contains anything other than numeric characters.
numS No Returns FALSE if the form element contains anything other than numeric and space characters.
float No Returns FALSE if the form element contains anything other than a float number.
regxp Yes Returns FALSE if the form element not meet a particular regular expression. regxp[/^[0-9a-zA-Z ]+$/]

All versions of php-formvalidator with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jasonsarino/php-formvalidator contains the following files

Loading the files please wait ....