PHP Classes

I would like /n to be added to each line of server side error

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  I would like /n to be added to each...  >  (Un) Subscribe thread alerts  
Subject:I would like /n to be added to each...
Summary:I would like /n to be added to each line of server side error
Messages:3
Author:Nikos
Date:2008-02-01 15:44:11
Update:2008-02-23 12:46:34
 

  1. I would like /n to be added to each...   Reply   Report abuse  
Picture of Nikos Nikos - 2008-02-01 15:44:11
Hello again folks :)

I have another question regarding Manuels excellent class

In the error message that is displayed upon form submission with Javascript disabled, for example


Validation error
!

It was not specified the User name It was not specified a valid e-mail address The password is not equal to the confirmation You have not specified a University Country You have not specified a University. Please pick the Educational Level. Please pick the Reason to Register. You have not agreed with the subscription terms.
!

Please verify also the remaining fields marked with [Verify]


The error message is fine except that I would like /n to be added to each part of it for example

It was not specified the User name/n It was not specified a valid e-mail/n.......etc

Is this possible


  2. Re: I would like /n to be added to each...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-02-01 17:57:21 - In reply to message 1 from Nikos
The class already adds the value of the end_of_line variable between error messages. Maybe you need to use the nl2br() function to display the error message in multiple lines in a Web page.

You can also use the ErrorMessageSuffix variable to add custom line breaking tags, but that gets added to all messages, not just between each couple of messages.

  3. Re: I would like /n to be added to each...   Reply   Report abuse  
Picture of Nikos Nikos - 2008-02-23 12:46:34 - In reply to message 2 from Manuel Lemos
Thanks for that, it works fine now :)