Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teodoroleckie/validator
⚡ Php validator (bool, int, float, number, string, email, uri)
https://github.com/teodoroleckie/validator
email-validator php-validation php-validator url-validation validation-library validator
Last synced: about 1 month ago
JSON representation
⚡ Php validator (bool, int, float, number, string, email, uri)
- Host: GitHub
- URL: https://github.com/teodoroleckie/validator
- Owner: teodoroleckie
- License: mit
- Created: 2021-05-11T13:28:15.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-20T11:20:46.000Z (over 3 years ago)
- Last Synced: 2024-10-13T13:20:55.956Z (2 months ago)
- Topics: email-validator, php-validation, php-validator, url-validation, validation-library, validator
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Php validator (bool, int, float, number, string, email, uri)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/teodoroleckie/validator/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/teodoroleckie/validator/?branch=main)
[![Code Intelligence Status](https://scrutinizer-ci.com/g/teodoroleckie/validator/badges/code-intelligence.svg?b=main)](https://scrutinizer-ci.com/code-intelligence)
[![Build Status](https://scrutinizer-ci.com/g/teodoroleckie/validator/badges/build.png?b=main)](https://scrutinizer-ci.com/g/teodoroleckie/validator/build-status/main)### Installation
You can install the package via composer:
```bash
composer require tleckie/validator
``````php
boolValidator()->isValid('true'); // false$validator->emailValidator()->isValid('[email protected]'); // true
$validator->floatValidator()->isValid(1.22); // true
$validator->intValidator()->isValid(1.22); // false
$validator->numericValidator()->isValid(1.22); // true
$validator->stringValidator()->isValid("1.22"); // true
$validator->uriValidator()->isValid("https://hostname.dev/path/"); // true
```