Remove comment bloat from Validator class.
This commit is contained in:
parent
42cff59a7d
commit
4a4a79ce34
|
@ -38,10 +38,7 @@ public function __construct($target = null)
|
|||
$target = Input::get();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// If the source is an Eloquent model, use the model's
|
||||
// attributes as the validation attributes.
|
||||
// ---------------------------------------------------------
|
||||
// If the source is an Eloquent model, use the model's attributes as the validation attributes.
|
||||
$this->attributes = ($target instanceof DB\Eloquent) ? $target->attributes : (array) $target;
|
||||
}
|
||||
|
||||
|
@ -67,10 +64,6 @@ public function is_valid()
|
|||
|
||||
foreach ($this->rules as $rule)
|
||||
{
|
||||
// ---------------------------------------------------------
|
||||
// The error collector is passed to the rule so that the
|
||||
// rule may conveniently add error messages.
|
||||
// ---------------------------------------------------------
|
||||
$rule->validate($this->attributes, $this->errors);
|
||||
}
|
||||
|
||||
|
@ -82,10 +75,6 @@ public function is_valid()
|
|||
*/
|
||||
public function __call($method, $parameters)
|
||||
{
|
||||
// ---------------------------------------------------------
|
||||
// Check if the validation rule is defined in the rules
|
||||
// directory. If it is, create a new rule and return it.
|
||||
// ---------------------------------------------------------
|
||||
if (file_exists(SYS_PATH.'validation/rules/'.$method.EXT))
|
||||
{
|
||||
$rule = '\\System\\Validation\\Rules\\'.$method;
|
||||
|
|
Loading…
Reference in New Issue