<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Require a minimum number of characters in a field?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Require a minimum number of characters in a field?</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 00:49:00 +0000</pubDate>

<item>
<title>Radices on "Require a minimum number of characters in a field?"</title>
<link>https://www.machform.com/forums/topic/require-a-minimum-number-of-characters-in-a-field#post-11627</link>
<pubDate>Thu, 17 Mar 2011 22:09:38 +0000</pubDate>
<dc:creator>Radices</dc:creator>
<guid isPermaLink="false">11627@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks!!
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Require a minimum number of characters in a field?"</title>
<link>https://www.machform.com/forums/topic/require-a-minimum-number-of-characters-in-a-field#post-11619</link>
<pubDate>Thu, 17 Mar 2011 11:36:46 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">11619@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;You need to put the custom code on different line number for simple name field. Try to go around line 322 on post-functions.php. You will see these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$target_input[$element_name]   = $user_input[$element_name];&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then you can add this code, exactly above that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 22 &#38;#38;&#38;#38; $element_name == &#38;#39;element_1_1&#38;#39;) {
	$rules[$element_name][&#38;#39;min&#38;#39;] = 1;
}

if ($form_id == 22 &#38;#38;&#38;#38; $element_name_2 == &#38;#39;element_1_2&#38;#39;) {
	$rules[$element_name_2][&#38;#39;min&#38;#39;] = 7;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;that would make you need to put at least 1 character for first name and 7 characters for last name.
&#60;/p&#62;</description>
</item>
<item>
<title>Radices on "Require a minimum number of characters in a field?"</title>
<link>https://www.machform.com/forums/topic/require-a-minimum-number-of-characters-in-a-field#post-11614</link>
<pubDate>Thu, 17 Mar 2011 01:57:55 +0000</pubDate>
<dc:creator>Radices</dc:creator>
<guid isPermaLink="false">11614@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;What is the proper syntax for the name field element where it is a multi element field...I've tried '_1' and it does not do anything (doesn't break the code but doesn't enforce the rule)
&#60;/p&#62;</description>
</item>
<item>
<title>willsffan on "Require a minimum number of characters in a field?"</title>
<link>https://www.machform.com/forums/topic/require-a-minimum-number-of-characters-in-a-field#post-10910</link>
<pubDate>Mon, 22 Nov 2010 23:05:03 +0000</pubDate>
<dc:creator>willsffan</dc:creator>
<guid isPermaLink="false">10910@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Awesome! Thanks very much!
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Require a minimum number of characters in a field?"</title>
<link>https://www.machform.com/forums/topic/require-a-minimum-number-of-characters-in-a-field#post-10899</link>
<pubDate>Mon, 22 Nov 2010 08:18:47 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">10899@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This can be done with small customization. If you want to insert this validation on single line text field type. You can edit &#34;includes/post-functions.php&#34; file and go to around line 191 for this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$rules[$element_name][&#38;#39;max&#38;#39;] 		= 255;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then add these code bellow that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 22 &#38;#38;&#38;#38; $element_id == 1) {
	$rules[$element_name][&#38;#39;min&#38;#39;] 		= 5;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;In there I assume your form id is 22 and the single line text field element id is 1. You need to change those id with yours.
&#60;/p&#62;</description>
</item>
<item>
<title>willsffan on "Require a minimum number of characters in a field?"</title>
<link>https://www.machform.com/forums/topic/require-a-minimum-number-of-characters-in-a-field#post-10894</link>
<pubDate>Sat, 20 Nov 2010 13:50:21 +0000</pubDate>
<dc:creator>willsffan</dc:creator>
<guid isPermaLink="false">10894@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Is it possible to require that a field contain a minimum number of characters?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
