Skip to content

Commit

Permalink
Added numeric range validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
alrik11es committed Jun 21, 2012
1 parent 9d68a20 commit 097b1c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sPHPf/vendors/coldstarstudios/databases/Pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function setCleanPath(){
* $actual_count means the count of elements this time, to know if
* the next button must appear or not.
*/
function simpleFooter($actual_count){
function simpleFooter(){
$pagination = '';
if(preg_match('/\?/', $this->page))
$separator = '&';
Expand Down
7 changes: 7 additions & 0 deletions sPHPf/vendors/coldstarstudios/validation/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ function dateRange($param1, $param2, $message){

}

function numericRange($param, $max, $min, $message){
if($param > $max || $param < $min) {
$this->isValid = false;
array_push($this->errors, array('message'=>$message));
}
}

/**
* Check if email is RFC 2822 Compliant
* @param type $param
Expand Down

0 comments on commit 097b1c5

Please sign in to comment.