[dev] UI widget for verifying e-mails

Dilyan Palauzov Dilyan.Palauzov at aegee.org
Wed Dec 28 12:19:40 PST 2005


Jan Schneider wrote:
> Zitat von Chuck Hagenbuch <chuck at horde.org>:
> 
> 
>>Quoting Dilyan Palauzov <Dilyan.Palauzov at aegee.org>:
>>
>>
>>>	As enough users do not manage to enter valid e-mail in the from_addr
>>>preference, I tought about creating a new widget of the type 'special',
>>>which verifies if the entered address is for sure invalid. However, the
>>>same widget could be applied also for the replyto_addr, so maybe
>>>creating a new kind of UI-widgets, called 'e-mail' would be a better
>>>solution.
>>
>>How about using Horde_Form for the prefs forms instead, and if
>>necessary adding further email validation rules to the existing
>>Horde_Form_Type_email field.
> 
> 
> And please note that CVS HEAD has an option to validate emails by  
> sending a verification email to this address. I can't think of a more  
> accurate test.
	Eh, the idea is to provide generaly reuseful features. I have no 
possibility to check HEAD and it would probably be improvement in the 
direction. However my problem is, that the users do not enter a domain 
in their imp-reply-to , which is latter completed by the MTA, Horde or 
whatever with the domain of the webserver. If I force them to put a @ 
the rest shall be probably clear in their heads. The whole regxex for 
e-mails is not needed for me at that moment.
	JavaScript cannot make thinks which can't be done by php, except that 
the checks could be done before the data is sent to the server. Anyway, 
this is not that important issue, so let's don't discuss the 
javascript/php part anymore.
	Horde_Form could be usefull, but I still do not look throgh the whole 
horde classes structure, so I couldn't find an example of integrating 
the Preferences with the Horde_Form system. If somebody gives me some 
hints, then I can try it. I found the function Horde_Form_Type::isValid 
.. I am not that sure in the way I can use it, but it would provides 
some way to check if the e-mail entered is for sure invalid.
	What I was talking about was a new kind of widget (near list, special, 
etc) used in the prefs.php files, which provides easy and fully featured 
ability to check the validity of the entered data (beside required/not 
required). E.g. to check if the entered data is a number or not.
	Greetings, Dilian


More information about the dev mailing list