mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-31 07:01:54 +00:00
Fixed typos
This commit is contained in:
parent
c049a8f380
commit
0ada9f2ad6
@ -3,7 +3,7 @@
|
|||||||
Valitron is a simple, minimal and elegant stand-alone validation library
|
Valitron is a simple, minimal and elegant stand-alone validation library
|
||||||
with NO dependencies. Valitron uses simple, straightforward validation
|
with NO dependencies. Valitron uses simple, straightforward validation
|
||||||
methods with a focus on readable and concise syntax. Valitron is the
|
methods with a focus on readable and concise syntax. Valitron is the
|
||||||
simple and pragmatic validation library you've been loking for.
|
simple and pragmatic validation library you've been looking for.
|
||||||
|
|
||||||
[](https://travis-ci.org/vlucas/valitron)
|
Status](https://travis-ci.org/vlucas/valitron.png?branch=master)](https://travis-ci.org/vlucas/valitron)
|
||||||
@ -152,7 +152,7 @@ Putting these techniques together, you can create a complete
|
|||||||
rule definition in a relatively compact data structure.
|
rule definition in a relatively compact data structure.
|
||||||
|
|
||||||
You can continue to add individual rules with the `rule` method
|
You can continue to add individual rules with the `rule` method
|
||||||
even after specifying a rule defnition via an array. This is
|
even after specifying a rule definition via an array. This is
|
||||||
especially useful if you are defining custom validation rules.
|
especially useful if you are defining custom validation rules.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
|||||||
10
lang/en.php
10
lang/en.php
@ -12,12 +12,12 @@ return array(
|
|||||||
'in' => "Invalid value",
|
'in' => "Invalid value",
|
||||||
'notIn' => "Invalid value",
|
'notIn' => "Invalid value",
|
||||||
'ip' => "Invalid IP address",
|
'ip' => "Invalid IP address",
|
||||||
'email' => "Inalid email address",
|
'email' => "Invalid email address",
|
||||||
'url' => "Inalid URL",
|
'url' => "Invalid URL",
|
||||||
'urlActive' => "Must be active domain",
|
'urlActive' => "Must be active domain",
|
||||||
'alpha' => "Must contain only leters a-z",
|
'alpha' => "Must contain only letters a-z",
|
||||||
'alphaNum' => "Must contain only leters a-z and/or numbers 0-9",
|
'alphaNum' => "Must contain only letters a-z and/or numbers 0-9",
|
||||||
'slug' => "Must contain only leters a-z, numbers 0-9, dashes and underscores",
|
'slug' => "Must contain only letters a-z, numbers 0-9, dashes and underscores",
|
||||||
'regex' => "Invalid format",
|
'regex' => "Invalid format",
|
||||||
'date' => "Invalid date",
|
'date' => "Invalid date",
|
||||||
'dateFormat' => "Must be date with format '%s'",
|
'dateFormat' => "Must be date with format '%s'",
|
||||||
|
|||||||
@ -4,7 +4,7 @@ namespace Valitron;
|
|||||||
/**
|
/**
|
||||||
* Validation Class
|
* Validation Class
|
||||||
*
|
*
|
||||||
* Validates input against certian criteria
|
* Validates input against certain criteria
|
||||||
*
|
*
|
||||||
* @package Valitron
|
* @package Valitron
|
||||||
* @author Vance Lucas <vance@vancelucas.com>
|
* @author Vance Lucas <vance@vancelucas.com>
|
||||||
@ -95,7 +95,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function validateEquals($field, $value, array $params)
|
protected function validateEquals($field, $value, array $params)
|
||||||
@ -109,7 +109,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateDifferent($field, $value, array $params)
|
protected function validateDifferent($field, $value, array $params)
|
||||||
@ -162,7 +162,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateLength($field, $value, $params)
|
protected function validateLength($field, $value, $params)
|
||||||
@ -195,7 +195,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateMin($field, $value, $params)
|
protected function validateMin($field, $value, $params)
|
||||||
@ -208,7 +208,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateMax($field, $value, $params)
|
protected function validateMax($field, $value, $params)
|
||||||
@ -221,7 +221,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateIn($field, $value, $params)
|
protected function validateIn($field, $value, $params)
|
||||||
@ -234,7 +234,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateNotIn($field, $value, $params)
|
protected function validateNotIn($field, $value, $params)
|
||||||
@ -362,6 +362,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateRegex($field, $value, $params)
|
protected function validateRegex($field, $value, $params)
|
||||||
@ -386,7 +387,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateDateFormat($field, $value, $params)
|
protected function validateDateFormat($field, $value, $params)
|
||||||
@ -401,7 +402,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateDateBefore($field, $value, $params)
|
protected function validateDateBefore($field, $value, $params)
|
||||||
@ -416,7 +417,7 @@ class Validator
|
|||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $fields
|
* @param array $params
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function validateDateAfter($field, $value, $params)
|
protected function validateDateAfter($field, $value, $params)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user