From 1cd1efdf47763e7737dedc2faea155e2b543346f Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 16 Oct 2005 23:53:19 +0000 Subject: [PATCH] - Added verify_noempty() - In set(), fixed the verify command for :self --- api.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/api.php b/api.php index c9f5919..6343c41 100644 --- a/api.php +++ b/api.php @@ -179,7 +179,7 @@ class API { if ($this->fields["$field"][2] == ':self') { - $verify = $this->{$this->{"verify_$field"}}($field); + $verify = $this->{"verify_$field"}($field); } else { @@ -375,6 +375,19 @@ class API return true; } + /** + * Verify field: not empty + */ + function verify_noempty($field) + { + if (empty($this->values["$field"])) + { + return false; + } + + return true; + } + /** * Cleans a value based on the field option * -- 2.43.5