phpDocumentor ninko
functions
[ class tree: ninko ] [ index: ninko ] [ all elements ]

Procedural File: validation.php

Source Location: /include/functions/validation.php

Page Details

validation.php

Includes functions for validation of specific items

Author:  Nijiko Yonskai <me@nijikokun.com>
Version:  1.2
Copyright:  (c) 2010 ANIGAIKU
Functions
age_limit  [line 188]

boolean age_limit( integer $year, integer $required  )

Very simple age check

Didn't want to delve really deep into age verification due to leap years and a thousand other variables. Subtracts required from the year to obtain how old they are if it they aren't old enough then false.

Parameters:
integer   $year:  birth year
integer   $required:  required age

API Tags:
See:  add_user()


[ Top ]
alpha  [line 19]

boolean alpha( string $string, [string $check = 'alpha']  )

Checks a string against a set of regular expressions

Parameters:
string   $string:  data that will be checked against regular expression
string   $check:  which expression to check against


[ Top ]
clean_input  [line 234]

mixed clean_input( mixed $user_input  )

Clean user input

Parameters:
mixed   $user_input:  data to be cleaned


[ Top ]
field_clean  [line 215]

mixed field_clean( mixed $value, [boolean $strip_tags = false]  )

Cleans form values

Parameters:
mixed   $value:  data to be cleaned
boolean   $strip_tags:  do we strip tags or not?


[ Top ]
is_email  [line 83]

boolean is_email( string $string  )

Checks for a valid email

Parameters:
string   $string:  data that will be checked as valid email


[ Top ]
is_md5  [line 132]

boolean is_md5( string $string  )

Checks for a valid md5 hash

Parameters:
string   $string:  data to be checked as valid md5


[ Top ]
is_url  [line 93]

boolean is_url( $url, string $string  )

Checks for a valid link

Parameters:
string   $string:  data that will be checked as valid url
   $url: 


[ Top ]
length  [line 161]

string length( string $string, [integer $min = 0], [integer $max = 0]  )

Checks the lenght of a string

Parameters:
string   $string:  data that will be stripped of repeats
integer   $min:  minimum length that $string can be
integer   $max:  maximum length that $string can be

API Tags:
See:  post(), update(), add_user()


[ Top ]
mysql_clean  [line 204]

mixed mysql_clean( mixed $value  )

Cleans mysql values

Parameters:
mixed   $value:  data to be cleaned


[ Top ]
strip_repeat  [line 142]

string strip_repeat( string $string  )

Strip repeat characters and spaces

Parameters:
string   $string:  data that will be stripped of repeats


[ Top ]
url_tag  [line 105]

string url_tag( string $url, [string $link = '']  )

Re-creates url structure and creates an html link out of it

Parameters:
string   $url:  url to be re-structured
string   $link:  title of url

API Tags:
See:  parse()


[ Top ]


Documentation generated on Sat, 06 Feb 2010 10:46:07 -0500 by phpDocumentor 1.4.3