<?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: Validation of a number field</title>
		<link>https://legacy.forums.gravityhelp.com/topic/validation-of-a-number-field</link>
		<description>Gravity Support Forums Topic: Validation of a number field</description>
		<language>en-US</language>
		<pubDate>Tue, 21 Apr 2026 20:38:12 +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/validation-of-a-number-field" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Validation of a number field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-of-a-number-field#post-183125</link>
			<pubDate>Sun, 24 Mar 2013 16:05:22 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">183125@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I received a message &#34;Registration is now closed. If you are interested in attending, please contact Jake Werner directly at 581-9277.&#34; when trying to access the form on that page. If you need help with this, please put a copy of the form on a page without scheduling the end date so we can take a look at it.  Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>callibeth on "Validation of a number field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-of-a-number-field#post-180093</link>
			<pubDate>Thu, 21 Mar 2013 20:55:56 +0000</pubDate>
			<dc:creator>callibeth</dc:creator>
			<guid isPermaLink="false">180093@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The form is here:&#60;br /&#62;
&#60;a href=&#34;http://bethshalombozeman.org/community/community-passover-seder&#34; rel=&#34;nofollow&#34;&#62;http://bethshalombozeman.org/community/community-passover-seder&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Validation of a number field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-of-a-number-field#post-179827</link>
			<pubDate>Thu, 21 Mar 2013 15:50:13 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">179827@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you please provide a link to the page on your site where the form is embedded so we can take a look at it?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>callibeth on "Validation of a number field"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/validation-of-a-number-field#post-177301</link>
			<pubDate>Tue, 19 Mar 2013 20:57:21 +0000</pubDate>
			<dc:creator>callibeth</dc:creator>
			<guid isPermaLink="false">177301@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a form which asks whether a registrant is requesting vegetarian meal(s). If the answer is yes, then 3 number fields appear asking how many meals for adults, older children, and younger children. If the registrant checks &#34;yes&#34; to request vegetarian meals but then doesn't modify any of the 3 number fields, I want the form to prompt the registrant to choose a non-zero number in at least 1 of those 3 number fields. So I've created a number field (id 39) in the form (id 12) which totals the 3 number fields, and added  the following code to functions.php&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;quot;gform_field_validation_12_39&#38;quot;, &#38;quot;custom_validation&#38;quot;, 10, 4);
function custom_validation($result, $value, $form, $field){
    if($result[&#38;quot;is_valid&#38;quot;] &#38;amp;&#38;amp; intval($value) == 0){
        $result[&#38;quot;is_valid&#38;quot;] = false;
        $result[&#38;quot;message&#38;quot;] = &#38;quot;Total vegetarian meals must be greater than zero&#38;quot;;
    }
    return $result;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;But it doesn't generate an error message if I leave all the 3 number fields as zero. What am I missing?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
