Hi,

Have you tried using Zend_Validate_EmailAddress? If for some reason it
is unsatisfactory for your use case, you can help us to improve it by
discussing the shortcomings you encounter here, and filing issues in the
JIRA issue tracker:

http://framework.zend.com/issues/secure/CreateIssue!default.jspa

If you do not already have authorization to create issues, first create
an account, and then simply send an e-mail to [EMAIL PROTECTED] requesting
permission to post issues and comments.

As for the second question, I think we'll need more information to be
able to help you:

How to Report Bugs Effectively
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Best regards,
Darby

ArticSun wrote:
> Hi all!
> 
>    I got two questions about validating form data. The first one might be
> the simplest. I've got a regular expression which checks if an e-mail
> address is correct:
> 
> new
> Zend_Validate_Regex("/^$|^[-a-z0-9!#$%&'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&'*+/=?^_`{|}~]+)*@(([a-z]([-a-z0-9]*[a-z0-9]+)?){1,63}\.)+([a-z]([-a-z0-9]*[a-z0-9]+)?){2,63}$/")
> 
> I've added the / at the beginning and end because other expressions wouldn't
> work without it. This expression works when I use it in "ereg" for example.
> I now get the error: "Internal error matching pattern {the pattern}". Does
> anyone know what I'm doing wrong, or what would be a good expression (but I
> don't want to make this a script request!).
> 
> The second question is about fields that get a <br /> when the value was not
> right regarding the validator. I do something like:
> 
> // Apply the filter to the post data.
> $oFilter = new Zend_Filter_Input($aFilters, $aValidators,
> $this->_request->getPost(), $aOptions);
> 
> // Save the data in the class var (escaped / html removed).
> $this->_aCheckedData['relation'] = $oFilter->getEscaped();
> 
> When there are errors I show the form again. I try to print the data again
> (the data I put in _aCheckedData['relation'] here), and now the field that
> was not correct, contains "<br />", in stead of the value the user filled
> in.
> 
> What could I be doing wrong here? If you need more information, please ask.
> 
> Thanks!

Reply via email to