[xoops-cvslog 1821] CVS update: xoops2jp/html/modules/user/forms

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 1月 17日 (火) 19:37:58 JST


Index: xoops2jp/html/modules/user/forms/LostpassEditForm.class.php
diff -u /dev/null xoops2jp/html/modules/user/forms/LostpassEditForm.class.php:1.1.2.1
--- /dev/null	Tue Jan 17 19:37:58 2006
+++ xoops2jp/html/modules/user/forms/LostpassEditForm.class.php	Tue Jan 17 19:37:58 2006
@@ -0,0 +1,38 @@
+<?php
+
+require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php";
+
+/**
+ * This class is generated by makeActionForm tool.
+ */
+class LostpassEditForm extends XCube_ActionForm
+{
+	function getTokenName()
+	{
+		return "module.user.LostpassEditForm.TOKEN";
+	}
+
+	function prepare()
+	{
+		//
+		// Set form properties
+		//
+		$this->mFormProperties['email'] =& new XCube_StringProperty('email');
+
+		//
+		// Set field properties
+		//
+		$this->mFieldProperties['email'] =& new XCube_FieldProperty($this);
+		$this->mFieldProperties['email']->setDependsByArray(array('required'));
+		$this->mFieldProperties['email']->addMessage('required', _MD_USER_ERROR_REQUIRED, _MD_USER_LANG_EMAIL);
+	}
+	
+	function validateEmail()
+	{
+		if ($this->get('email') != null && !preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$this->get('email'))) {
+			$this->addErrorMessage(_MD_USER_ERROR_EMAIL_FORMAT);
+		}
+	}
+}
+
+?>


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る