Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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)

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

```