Skip to content

Commit

Permalink
Fixes #4053 - fixing references to old Validate class
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpittet authored and kiall committed Jul 11, 2011
1 parent ca203c0 commit eb81bec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion classes/kohana/valid.php
Expand Up @@ -224,7 +224,7 @@ public static function ip($ip, $allow_private = TRUE)
* @param integer credit card number
* @param string|array card type, or an array of card types
* @return boolean
* @uses Validate::luhn
* @uses Valid::luhn
*/
public static function credit_card($number, $type = NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion classes/kohana/validation/exception.php
Expand Up @@ -14,7 +14,7 @@ class Kohana_Validation_Exception extends Kohana_Exception {
public $array;

/**
* @param Validate Validate object
* @param Validation Validation object
* @param string error message
* @param array translation variables
* @param int the exception code
Expand Down
6 changes: 3 additions & 3 deletions guide/kohana/security/validation.md
Expand Up @@ -2,7 +2,7 @@

*This page needs to be reviewed for accuracy by the development team. Better examples would be helpful.*

Validation can be performed on any array using the [Validation] class. Labels and rules can be attached to a Validate object by the array key, called a "field name".
Validation can be performed on any array using the [Validation] class. Labels and rules can be attached to a Validation object by the array key, called a "field name".

labels
: A label is a human-readable version of the field name.
Expand Down Expand Up @@ -32,7 +32,7 @@ Rule name | Function
[Valid::max_length] | Maximum number of characters for value
[Valid::exact_length] | Value must be an exact number of characters
[Valid::email] | An email address is required
[Validate::email_domain] | Check that the domain of the email exists
[Valid::email_domain] | Check that the domain of the email exists
[Valid::url] | Value must be a URL
[Valid::ip] | Value must be an IP address
[Valid::phone] | Value must be a phone number
Expand Down Expand Up @@ -180,7 +180,7 @@ Next, we need a controller and action to process the registration, which will be
{
$user = Model::factory('user');

$post = Validate::factory($_POST)
$post = Validation::factory($_POST)
->rule('username', 'not_empty')
->rule('username', 'regex', array(':value', '/^[a-z_.]++$/iD'))
->rule('username', array($user, 'unique_username'))
Expand Down

0 comments on commit eb81bec

Please sign in to comment.