<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Custom Validation disables validation on required fields</title>
		<link>https://legacy.forums.gravityhelp.com/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car</link>
		<description>Gravity Support Forums Topic: Custom Validation disables validation on required fields</description>
		<language>en-US</language>
		<pubDate>Fri, 24 Apr 2026 18:32:11 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car" rel="self" type="application/rss+xml" />

		<item>
			<title>growthspark on "Custom Validation disables validation on required fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car#post-21271</link>
			<pubDate>Wed, 23 Mar 2011 22:12:50 +0000</pubDate>
			<dc:creator>growthspark</dc:creator>
			<guid isPermaLink="false">21271@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Found the issue... I had a line in the wrong place...&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$validation_result[&#38;quot;is_valid&#38;quot;] = false;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Had to go as part of the error code in this block:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$validation_result[&#38;quot;is_valid&#38;quot;] = false;
$form[&#38;quot;fields&#38;quot;][0][&#38;quot;failed_validation&#38;quot;] = true;
$form[&#38;quot;fields&#38;quot;][0][&#38;quot;validation_message&#38;quot;] = &#38;quot;The Calculated VIN Check Digit is Incorrect&#38;quot;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;In the code above I had it only once above with the &#34;set form validation to false block&#34; like it is in the doc:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/forums/topic/validate-input#post-19083&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/forums/topic/validate-input#post-19083&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>growthspark on "Custom Validation disables validation on required fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car#post-21269</link>
			<pubDate>Wed, 23 Mar 2011 21:51:28 +0000</pubDate>
			<dc:creator>growthspark</dc:creator>
			<guid isPermaLink="false">21269@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;&#60;a href=&#34;http://www.pastie.org/1706525&#34; rel=&#34;nofollow&#34;&#62;http://www.pastie.org/1706525&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Actually... not quite out of the woods.&#60;br /&#62;
With the code at the link above, everything errors out as expected and all my custom checks work properly, except...&#60;/p&#62;
&#60;p&#62;The whole form when filled out correctly now prints an error of: There was a problem with your submission.  Errors have been highlighted below&#60;/p&#62;
&#60;p&#62;No field is highlighted or displays an error and the form does not submit.&#60;/p&#62;
&#60;p&#62;I tried removing each part of the check until I was left with a barebones piece of code and still gave the experience above.&#60;br /&#62;
It wasn't until I removed the whole custom function that I was able to submit the form.  Is something missing?  I think all the required parts from the example hooks are in there.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>growthspark on "Custom Validation disables validation on required fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car#post-21246</link>
			<pubDate>Wed, 23 Mar 2011 19:10:56 +0000</pubDate>
			<dc:creator>growthspark</dc:creator>
			<guid isPermaLink="false">21246@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Amazing.&#60;br /&#62;
I was also missing&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$validation_result[&#38;quot;is_valid&#38;quot;] = false;
$form = $validation_result[&#38;quot;form&#38;quot;];&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;From right after the comment saying it was coming up... adding that in and commenting out that line you suggested and looks great.&#60;/p&#62;
&#60;p&#62;If you don't mind (because my brain works that way), what was that line I commented out doing? Was it hijacking that $form variable I needed for other purposes?&#60;/p&#62;
&#60;p&#62;One last thing... I got hasty when I entered the title of the post and the permalink to this topic is completely unhelpful - could you adjust it so it reads more like what the actual title of the post is?&#60;/p&#62;
&#60;p&#62;Thanks for ALL your help!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Custom Validation disables validation on required fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car#post-21239</link>
			<pubDate>Wed, 23 Mar 2011 18:57:54 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">21239@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi GrowthSpark,&#60;/p&#62;
&#60;p&#62;Remove the following line from you code and all should be well (ln 12).&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$form = RGFormsModel::get_form_meta($form_id);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>growthspark on "Custom Validation disables validation on required fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car#post-21158</link>
			<pubDate>Wed, 23 Mar 2011 10:34:12 +0000</pubDate>
			<dc:creator>growthspark</dc:creator>
			<guid isPermaLink="false">21158@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;&#60;a href=&#34;http://www.pastie.org/1704099&#34; rel=&#34;nofollow&#34;&#62;http://www.pastie.org/1704099&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Here is the code that I am using for the VIN validation.  It hits it with several checks as you'll see.&#60;/p&#62;
&#60;p&#62;The form is here:&#60;br /&#62;
&#60;a href=&#34;http://tinyurl.com/4tevcnb&#34; rel=&#34;nofollow&#34;&#62;http://tinyurl.com/4tevcnb&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You will need to login as a test user (upper right link).&#60;br /&#62;
u: anotherone&#60;br /&#62;
p: password&#60;/p&#62;
&#60;p&#62;You can then see the GF.  It creates a post to a CPT for Cars.&#60;br /&#62;
All of the fields are required (except for description).&#60;br /&#62;
Without my function above, all the other fields will show an error if left blank.  With it, only the VIN field will show an error.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Custom Validation disables validation on required fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car#post-21055</link>
			<pubDate>Tue, 22 Mar 2011 14:15:47 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">21055@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;No, it should be specific to your field.  It is probably how you implemented it, it probably wasn't done in a way that it is field specific.  Post your custom code to &#60;a href=&#34;http://www.pastie.org/&#34; rel=&#34;nofollow&#34;&#62;http://www.pastie.org/&#60;/a&#62; and provide a link to it so we can take a look at your custom validation code.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>growthspark on "Custom Validation disables validation on required fields"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/httpwwwiconic5commemberstestaccountcarsadd-a-car#post-21050</link>
			<pubDate>Tue, 22 Mar 2011 13:47:06 +0000</pubDate>
			<dc:creator>growthspark</dc:creator>
			<guid isPermaLink="false">21050@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi.&#60;br /&#62;
I was able to use the custom validation hook to write up a validation for a VIN field on my form.  Works awesome, was able to include checks for caps, string length, certain characters - amazing.&#60;/p&#62;
&#60;p&#62;Problem is, when the function is in there, it disables validation on the other form fields... so as long as my custom validation is active, required fields don't show errors.&#60;br /&#62;
When I remove it, my VIN field doesn't get checked (of course) but validations return for everything else.&#60;/p&#62;
&#60;p&#62;Does this mean that if I use custom validation, I have to define new checks for each field in my form?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
