|
static | fail ($obj, Array $rules) |
|
static | numeric ($check) |
|
static | int ($check) |
|
static | maxlength ($value, $param) |
|
static | range ($value, $param) |
|
static | selet ($value, $param) |
|
static | email ($mail) |
|
static | url ($url, $param) |
|
static | ip ($ip, $flags=FILTER_FLAG_IPV4) |
|
static | required ($check) |
|
static | alphanum ($string) |
|
static | date ($value, $format= 'd-m-y') |
|
static | pattern ($check, $param) |
|
static | decimal ($value, $param) |
|
|
const | IS_ALPHANUM = '/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/mu' |
|
Definición en la línea 22 del archivo validate.php.
__construct |
( |
|
$obj, |
|
|
Array |
$rules |
|
) |
| |
static alphanum |
( |
|
$string) | |
|
|
static |
Valida que un String sea alpha-num (incluye caracteres acentuados) TODO: Revisar este método
- Parámetros
-
- Devuelve
- bool
Definición en la línea 246 del archivo validate.php.
static date |
( |
|
$value, |
|
|
|
$format = 'd-m-y' |
|
) |
| |
|
static |
Valida una fecha TODO: REVISAR EL ESTANDAR
- Parámetros
-
string | $value | fecha a validar acorde al formato indicado |
string | $format | formato de fecha. acepta: d-m-y, y-m-d, m-d-y, donde el "-" puede ser cualquier caracter de separacion incluso un espacio en blanco o ".", exceptuando (d,m,y o números). |
- Devuelve
- boolean
Definición en la línea 259 del archivo validate.php.
static decimal |
( |
|
$value, |
|
|
|
$param |
|
) |
| |
|
static |
Valida si es un número decimal
- Parámetros
-
string | $value | |
string | $decimal | |
- Devuelve
- boolean
Definición en la línea 305 del archivo validate.php.
Valida que una cadena sea un mail
- Parámetros
-
- Devuelve
- bool
Definición en la línea 200 del archivo validate.php.
Ejecuta las validaciones El método "rules" debe devolver un array de la siguiente manera return array( 'user' => //este es el nombre del campo array( 'alpha' => //nombre del filtro null, //parametros pasados (en array o null si no se requiere) 'lenght' => array('min'=>4, 'max'=>10) ) )
- Devuelve
- bool Devuelve true si todo es válido
Definición en la línea 87 del archivo validate.php.
static fail |
( |
|
$obj, |
|
|
Array |
$rules |
|
) |
| |
|
static |
Devuelve los mensajes de error
Definición en la línea 120 del archivo validate.php.
Valida que int
- Parámetros
-
- Devuelve
- bool
Definición en la línea 145 del archivo validate.php.
static ip |
( |
|
$ip, |
|
|
|
$flags = FILTER_FLAG_IPV4 |
|
) |
| |
|
static |
Valida que sea una IP, por defecto v4 TODO: Revisar este método
- Parámetros
-
- Devuelve
- bool
Definición en la línea 223 del archivo validate.php.
static maxlength |
( |
|
$value, |
|
|
|
$param |
|
) |
| |
|
static |
Valida que una cadena este entre un rango. Los espacios son contados Retorna true si el string $value se encuentra entre min and max
- Parámetros
-
- Devuelve
- bool
Definición en la línea 159 del archivo validate.php.
Valida que sea numérico
- Parámetros
-
mixed | $check | Valor a ser chequeado |
- Devuelve
- bool
Definición en la línea 135 del archivo validate.php.
static pattern |
( |
|
$check, |
|
|
|
$param |
|
) |
| |
|
static |
Valida un string dada una Expresion Regular
- Parámetros
-
string | $check | |
string | $regex | |
- Devuelve
- bool
Definición en la línea 292 del archivo validate.php.
static range |
( |
|
$value, |
|
|
|
$param |
|
) |
| |
|
static |
Valida que es un número se encuentre en un rango minímo y máximo
- Parámetros
-
int | $value | |
int | $min | |
int | $max | |
Definición en la línea 173 del archivo validate.php.
static required |
( |
|
$check) | |
|
|
static |
Valida que un string no sea null
- Parámetros
-
- Devuelve
- bool
Definición en la línea 234 del archivo validate.php.
static selet |
( |
|
$value, |
|
|
|
$param |
|
) |
| |
|
static |
Valida que un valor se encuentre en una lista Retorna true si el string $value se encuentra en la lista $list
- Parámetros
-
- Devuelve
- bool
Definición en la línea 189 del archivo validate.php.
static url |
( |
|
$url, |
|
|
|
$param |
|
) |
| |
|
static |
Valida URL
- Parámetros
-
- Devuelve
- bool
Definición en la línea 211 del archivo validate.php.
const IS_ALPHANUM = '/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/mu' |
Constantes para definir los patrones
Definición en la línea 31 del archivo validate.php.
La documentación para esta clase fue generada a partir del siguiente fichero: