[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/ -> Validate.php (sommaire)

(pas de description)

Poids: 447 lignes (17 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Validate:: (10 méthodes):
  number()
  email()
  string()
  url()
  creditCard()
  date()
  isbn()
  _substr()
  _modf()
  multiple()


Classe: Validate  - X-Ref

number($number, $options)   X-Ref
Validate a number

param: string    $number     Number to validate
param: array     $options    array where:

email($email, $check_domain = false)   X-Ref
Validate a email

param: string    $email          URL to validate
param: boolean   $domain_check   Check or not if the domain exists

string($string, $options)   X-Ref
Validate a string using the given format 'format'

param: string    $string     String to validate
param: array     $options    Options array where:

url($url, $domain_check = false)   X-Ref
Validate a URL

param: string    $url            URL to validate
param: boolean   $domain_check   Check or not if the domain exists

creditCard($creditCard)   X-Ref
Validate a number according to Luhn check algorithm

This function checks given number according Luhn check
algorithm. It is published on several places, also here:

http://www.webopedia.com/TERM/L/Luhn_formula.html
http://www.merriampark.com/anatomycc.htm
http://hysteria.sk/prielom/prielom-12.html#3 (Slovak language)
http://www.speech.cs.cmu.edu/~sburke/pub/luhn_lib.html (Perl lib)

author: Ondrej Jombik <nepto@pobox.sk>
param: string  $number number (only numeric chars will be considered)
return: bool    true if number is valid, otherwise false

date($date, $options)   X-Ref
Validate date and times. Note that this method need the Date_Calc class

param: string    $date   Date to validate
param: array     $options array options where :
return: bool

isbn($isbn)   X-Ref
Validate a ISBN number

This function checks given number according

author: Damien Seguy <dams@nexen.net>
param: string  $isbn number (only numeric chars will be considered)
return: bool    true if number is valid, otherwise false

_substr(&$date, $num, $opt = false)   X-Ref
Pas de description

_modf($val, $div)   X-Ref
Pas de description

multiple(&$data, &$val_type, $remove = false)   X-Ref
Bulk data validation for data introduced in the form of an
assoc array in the form $var_name => $value.

param: array   $data     Ex: array('name'=>'toto','email'='toto@thing.info');
param: array   $val_type Contains the validation type and all parameters used in.
param: boolean $remove if set, the elements not listed in data will be removed
return: array   value name => true|false    the value name comes from the data key



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7