<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Sat, 20 Mar 2010 21:26:40 -0500 -->
<rss version="2.0">
  <channel>    <title>Codeassembly - Validate your html forms with javascript and php with a simple php class that generates everything</title>
    <link>http://www.codeassembly.com/feed/comments/23</link>
    <description>CodeAssembly - Simplicity is prerequisite for reliability - Comments</description>
    <language>en-us</language>
    <managingEditor>contact@codeassembly.com</managingEditor>
    <webMaster>contact@codeassembly.com</webMaster>
    <generator>RSS Feed Generator</generator>
    <item>
      <title>Pas Argenio</title>
      <description>Do I need the formValidator class or .inc.php file?  Where do I place the files?  When I try it I get a blank page.</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#281</link>
      <pubDate>2009-12-30 10:02:27</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#281</guid>
    </item>
    <item>
      <title>t-man</title>
      <description>Great script!
Bu it doesn't seem to work when I want to add 2 forms to my page.
When I click submit on one of both forms, both forms are automatically validated. Even if I use different names for all the objects.

Is this normal or am I doing something wrong?</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#206</link>
      <pubDate>2009-02-21 14:35:28</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#206</guid>
    </item>
    <item>
      <title>Bao Nhan</title>
      <description>I love it :)</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#152</link>
      <pubDate>2008-08-16 14:29:29</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#152</guid>
    </item>
    <item>
      <title>Mike</title>
      <description>Nice class but don't forego service side validation. Client side validation does make the UI better for the user. But  savvy user can still monkey with input after processing with Javascript. 

Always do server side validation. Always. </description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#55</link>
      <pubDate>2008-03-21 14:02:43</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#55</guid>
    </item>
    <item>
      <title>YIT</title>
      <description>Great resource, i am using it to validate a registration form on my website, it works perfect. Thank you</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#49</link>
      <pubDate>2007-11-26 09:13:37</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#49</guid>
    </item>
    <item>
      <title>Raul Saucedo</title>
      <description>Thanks for your answer,

I believe I got the file location issues covered.

I did test with all the files in the same directory on my local web server, just in case, I re-downloaded the files and tested again both on my local server and on my hosting. 

I tried with MS Explorer 6.0 SP2, Firfox 2.0.0.7 and Safari 2.02 for win, on a Win XP SP2 machine, the results are identical on all browsers. 

You can see what I mean at this address: http://www.masterkey.com.mx/validate.php

I am still wondering why the html form name is not returned to the script, although there is a lot in it so at least it is partially working.

Thanks in advance,

Best Regards,

Ra</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#12</link>
      <pubDate>2007-11-19 08:53:33</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#12</guid>
    </item>
    <item>
      <title>CodeAssembly</title>
      <description>You must put the files from this example in your "Document root" folder of your web server.
I think the problem is that "validate.js" is not included in your html file, check the path of "validate.js".
Also you didn't specify what browser you used, I only tested this example on Firefox and Internet Explorer.

</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#11</link>
      <pubDate>2007-11-19 08:53:57</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#11</guid>
    </item>
    <item>
      <title>Raul Saucedo</title>
      <description>Well this looks exactly what I need to verify inouto on my Web Site. 

Looks nice and clean.

Unfortunatelly it does not work (at least for me), Am I doing something wrong? I know, stupid things take a long time...

For some reason the "validate.js" is not producing the full code.
1) the desired script second line is missing:
"function validateuser_registration(formname) {" so initially the broser marks an error "error: return statement outside function" becasue the function was not called.

2) Then the second fucntions wich apparently most to get the "Formname" is not geting it.

3) Sadly even I fill manually those gaps manually, the validation starts to work, but when the form is correctly filled, I does not call the exit function, but shows the form again, with the data initially placed on it before all the validations clear...

I am sorry but I do not know any JS, so I ca not help.

Here it is what I get from the JS function:
<script>
error_color = '#FEFE00';
if (!minLength(formname.user,3,"Username must have at least 3 characters !")) return false;else
if (!IsEmpty(formname.name,"You forgot to enter your name !")) return false;else
if (!IsEmpty(formname.surname,"You forgot to enter your surname !")) return false;else
if (!isEmail(formname.email,"You must enter a valid email !")) return false;else
if (!isEmail(formname.email2,"You must enter a valid email2 !")) return false;else
if (!minLength(formname.pass,6,"Your password must have at least 6 characters !")) return false;else
if (!passwordMatch(formname.pass,formname.pass2,"Password don't match !")) return false;else
;
return true;};
function init(e)
{
	if ( validate(document.) == false ) 
	{
		if (!e) var e = window.event;
		if (e.preventDefault) {
		      e.preventDefault();
		      e.stopPropagation();
		} else {
		      e.returnValue = false;
		      e.cancelBubble = true;
		}		
		return false;
	} else
	{
		return true; 
	}
	//cancel submit if validate returns false;
}	

if (document.getElementById('').addEventListener)
{
  document.getElementById('').addEventListener('submit', init, false); 
} else if (document.getElementById('').attachEvent)
{
  document.getElementById('').attachEvent('onsubmit', init);
} else
{
	document.getElementById('').onclick = init;
}</script>

Would love to have it working!

Thanks in advance and keep doing this nice work.

Regards,

Raul S.




</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#9</link>
      <pubDate>2007-11-19 08:52:47</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#9</guid>
    </item>
    <item>
      <title>Hernan</title>
      <description>Useful class.  I will include it in my php resources collection :)</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#7</link>
      <pubDate>2007-11-19 08:52:30</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#7</guid>
    </item>
    <item>
      <title>Notos</title>
      <description>Exlenet class but i whoul like to soo less alert and more in line alert ala DHTML</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#4</link>
      <pubDate>2007-11-19 08:51:57</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#4</guid>
    </item>
    <item>
      <title>kya</title>
      <description>nice codes.
it hep me a lot
expecting more like this
keep it up</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#3</link>
      <pubDate>2007-11-19 08:51:37</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#3</guid>
    </item>
    <item>
      <title>CodeAssembly</title>
      <description>I checked the example from your web server and I noticed that variables inside the heredoc from formvalidator class, are not parsed, it seems that there is a problem with new line characters between operating systems <a href="http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc">http://www.php.net/manual/en/language.types.string.php</a>. I'm using linux, I guess you are running windows for your web server, so the new line character is not the same and the heredoc does not parse correctly.
I replaced the heredoc with a double quoted string so now it should work on windows also.
You can download the new files and try it.
Thanks for the bug report.


</description>
      <link>http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#0</link>
      <pubDate>2007-11-19 08:53:22</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Validate-your-html-forms-with-javascript-and-php-with-a-simple-php-class-that-generates-everything/#0</guid>
    </item>
  </channel></rss>