summaryrefslogtreecommitdiff
path: root/framework/Web/UI/IValidator.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2015-01-20 22:54:21 +0100
committerFabio Bas <ctrlaltca@gmail.com>2015-01-20 22:54:21 +0100
commitf6b22febb41b3f552e36d5d0190ce8672b4d6d6e (patch)
tree71b9633c8848437fb7ea50ae96ee1e295ec5a721 /framework/Web/UI/IValidator.php
parente2d11c31ca2671e812a8206627dffd00bfd192ea (diff)
one class per file: framework/Web/UI/*.php
Diffstat (limited to 'framework/Web/UI/IValidator.php')
-rw-r--r--framework/Web/UI/IValidator.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/framework/Web/UI/IValidator.php b/framework/Web/UI/IValidator.php
new file mode 100644
index 00000000..d6e43146
--- /dev/null
+++ b/framework/Web/UI/IValidator.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * TControl, TControlCollection, TEventParameter and INamingContainer class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package System.Web.UI
+ */
+
+
+/**
+ * IValidator interface
+ *
+ * If a control wants to validate user input, it must implement this interface.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @package System.Web.UI
+ * @since 3.0
+ */
+interface IValidator
+{
+ /**
+ * Validates certain data.
+ * The implementation of this function should validate certain data
+ * (e.g. data entered into TTextBox control).
+ * @return boolean whether the data passes the validation
+ */
+ public function validate();
+ /**
+ * @return boolean whether the previous {@link validate()} is successful.
+ */
+ public function getIsValid();
+ /**
+ * @param boolean whether the validator validates successfully
+ */
+ public function setIsValid($value);
+ /**
+ * @return string error message during last validate
+ */
+ public function getErrorMessage();
+ /**
+ * @param string error message for the validation
+ */
+ public function setErrorMessage($value);
+} \ No newline at end of file