Download the PHP package moviet/panic-validator without Composer
On this page you can find all versions of the php package moviet/panic-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download moviet/panic-validator
More information about moviet/panic-validator
Files in moviet/panic-validator
Package panic-validator
Short Description A simple php validation library for php
License MIT
Homepage https://github.com/moviet/panic-validator
Informations about the package panic-validator
Panic - A simple php validation and sanitation
Panic validator is adobted for simple lovely and easy like common validation in php
There are no hardcoded for simply usage, no weight and pretty useful
Preparement
Quick Start
Installations
Features
- Simply Validation
- Custom Warning
- Custom Verification
- Simple Filtering
- Modify Pattern
- Validate Password
- Sanitize Html
- ❖ Plus Bonus ❖
Common Usage
Simply Validation
-
You can validate with fast direct resolve example
The above will return value, if doesn't match will return false
-
Or maybe you enjoy quietly with something like this
The above will return value, if doesn't match will return false
Custom Warning
-
Validate using your own message
-
Validate using limit and custom language
-
Validate using empty case
Notes :
You can't validate an empty value, by default the field does not allow empty chunks
Custom Verification
-
You can validate for example html form like simply below
-
Render on your own template html form example
- If the above doesn't look so nice, you can trust with new endorse
Simple Filtering
- We use native filter functions look like below
Modify Pattern
-
You can modify with modify like modify your own rules
- You may want to draft and match for non messenger
Validate Password
- We put a simply for native password hash validation
Sanitize Html
- You can sanitize with our little pony for simply safe html as one packet
Plus Bonus
- Whatever usage a custom clean base64 encode may interesting
Patterns:
Attributes | Format |
---|---|
:num | 0 - 9 |
:phone | +081991988xx (plus +) |
:int | Integer/Number |
:alpha | Alphabets |
:alphaNum | Alphabets Number |
:alphaSpace | Alphabets Plus Spaces |
:alNumSpace | Alphabets Number Spaces |
:query | Http Url Query |
:url | Url Address |
:image | jpg, jpeg, png, bmp, gif |
:doc | pdf,xls,doc,rtf,txt,ppt,pptx |
:address | Normal Address |
:subject | Email Subject |
Email Address | |
:message | Simple Message Characters |
Filters:
Attributes | Format |
---|---|
:int | Filter Validate Integer |
:float | Filter Validate Float |
:url | Filter Validate Url |
:domain | Filter Validate Domain |
:ip4 | Filter Validate IP4 |
:ip6 | Filter Validate IP6 |
Filter Validate Email |
License
Moviet/panic-validator
is released under the MIT public license.