<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/discussions/f/user-interface/19967/i-want-to-put-a-condition-that-text-field-does-not-accept-numbers</link><description>In the expense Item name field I don&amp;#39;t want that the user can put there numbers. If done, It should return error as &amp;quot;don&amp;#39;t put numbers in the text field. &amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78108?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2020 09:20:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:84b40e53-4c77-4d9b-9565-de0ca2f0b5aa</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;like it. Very valuable input :)&amp;nbsp; &amp;nbsp;Thank you davidl280&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78101?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 23:40:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:295f9e47-65a7-4bd5-bc2f-43a2c28bdfea</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Yeah this is way better than my suggestion above&amp;nbsp;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78073?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 14:51:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:18145af1-dcab-4cce-b31c-a9cc2d0223c4</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Just for fun, add &lt;span&gt;(╯&amp;deg;□&amp;deg;)╯︵ ┻━┻&lt;/span&gt; to the whitelist also.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78072?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 14:46:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3473ae31-cdf0-426b-a997-6ec4251c076e</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;You have the option of either cleanwith or stripwith.&lt;/p&gt;
&lt;p&gt;One whitelists, the other blacklists.&lt;/p&gt;
&lt;p&gt;Blacklist means you have a list of characters that are NOT allowed, in your case your blacklist would be {1,2,3,4,5,6,7,8,9,10}.&amp;nbsp; The problem is that you allow EVERYTHING not in the blacklist, so you have to enumerate everything in the universe you don&amp;#39;t want to allow.&amp;nbsp; People can still input A, or&amp;nbsp;&lt;span&gt;&amp;Ccedil;, or&amp;nbsp;Ц, or&amp;nbsp;ㅂ, or&amp;nbsp;き or&amp;nbsp;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f61b.svg" title="Stuck out tongue"&gt;&amp;#x1f61b;&lt;/span&gt;&amp;nbsp;or&amp;nbsp;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/2694.svg" title="Crossed swords"&gt;&amp;#x2694;&lt;/span&gt;️&amp;nbsp;or &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f680.svg" title="Rocket"&gt;&amp;#x1f680;&lt;/span&gt;&amp;nbsp;or (╯&amp;deg;□&amp;deg;)╯︵ ┻━┻ into your text field.&amp;nbsp; There&amp;#39;s a world absolutely full of what you don&amp;#39;t want.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Whitelisting is much safer; it&amp;#39;s the exact opposite, a list of all the characters that ARE allowed, in your specifically worded case only {abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}&amp;nbsp; You DISALLOW everything not in the whitelist.&amp;nbsp; It looks like a lot, but now your users can really use &amp;quot;only letters&amp;quot; and all the examples above AND numbers will all fail to be input.&amp;nbsp; Whitelisting is much safer because it accounts for everything you thought of&amp;nbsp;and everything you didn&amp;#39;t think of too.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78069?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 14:05:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:be5e10c6-604d-4216-9b9d-cdc646e8bc32</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Yep, it will work for alphanumeric too! For example, if the text string I gave was &amp;quot;abc123&amp;quot;, the cleanwith() example I showed above would return &amp;quot;123&amp;quot;. The reason I like this function is that you don&amp;#39;t have to do any looping - just provide the text you want to look for and it will identify if any of them are present.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78064?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 06:35:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4a69ec63-d101-4314-ac93-7c3b518d5448</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;Hi peter,&lt;/p&gt;
&lt;p&gt;thank you for your valuable response.&lt;/p&gt;
&lt;p&gt;I was originally on the same path with cleanwith. :)&amp;nbsp;&lt;br /&gt;I dismissed it because it filteres inserted values and asks, if something is left. Works fine for pure inserted numbers.&amp;nbsp;&lt;br /&gt;does this work&amp;nbsp; for alphanumeric ?&lt;/p&gt;
&lt;p&gt;haven&amp;#39;t tested it. Thank you for your input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78043?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2020 14:16:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5a08cb58-8794-4fb5-8994-d598b92407cd</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Richard&amp;#39;s suggestion should do the trick! I also like to use the cleanwith() function to identify any uses of numbers in a text string:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!textField(
  label: &amp;quot;Text&amp;quot;,
  saveInto: ri!text,
  value: ri!text,
  validations: {
    if(
      isnull(
        cleanwith(
          ri!text,
          &amp;quot;1234567890&amp;quot;
        )
      ),
      null,
      &amp;quot;Please provide only letters&amp;quot;
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78039?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2020 11:28:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:36d61a95-82a1-406e-b238-ddc3dbaffc87</guid><dc:creator>Pedro Sim&amp;#245;es</dc:creator><description>&lt;p&gt;You&amp;#39;re right Richard. Thank you for bringing that up.&lt;/p&gt;
&lt;p&gt;With that taken into consideration,&amp;nbsp;&lt;a href="/members/vikashk739"&gt;vikashk739&lt;/a&gt;&amp;nbsp;you can always use a regular expression to control the behavior you want (you&amp;#39;ll need the Regular Expression Functions plugin - &lt;a href="https://community.appian.com/b/appmarket/posts/regular-expression-functions"&gt;community.appian.com/.../regular-expression-functions&lt;/a&gt; -). Also check Richard&amp;#39;s suggestion below using an enumerate.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!textField(
    label: &amp;quot;Expense Item&amp;quot;,
    labelPosition: &amp;quot;ABOVE&amp;quot;,
    value:ri!text,
    saveInto: ri!text,
    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
    validations: if(regexmatch(&amp;quot;^[a-zA-Z ]*$&amp;quot;,ri!text),null,&amp;quot;No Numbers Please&amp;quot;)
  )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78038?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2020 11:26:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b530fbfe-659c-4171-b6aa-9562064c0cec</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;hi vikashk,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!textfield() has a validation attribute called &amp;quot;v&lt;span&gt;alidations&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;check&lt;br /&gt;&lt;a href="https://docs.appian.com/suite/help/18.4/Text_Component.html"&gt;https://docs.appian.com/suite/help/18.4/Text_Component.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;you can use a if clause here.&amp;nbsp;&lt;br /&gt;Example of several ways to solve it:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
validations: if(
contains(
  a!forEach(
    items: enumerate(10),
    expression: search(tostring(fv!item),local!saveInto,1)=0
  ),
  false
),
&amp;quot;dont put numbers&amp;quot;,
{}
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78037?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2020 11:15:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:06dae5b0-67e6-4fea-97a1-920f8e32d219</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;As i understand, this topic solves the issue to just have numbers. vikashk wants the other way around, that no numbers should be possible.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to put a condition that text field does not accept numbers</title><link>https://community.appian.com/thread/78036?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2020 09:41:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e8491d0d-baab-440a-b17d-89ecdb72babb</guid><dc:creator>Pedro Sim&amp;#245;es</dc:creator><description>&lt;p&gt;Hi Vikash,&lt;/p&gt;
&lt;p&gt;I suggest you check the following thread in which some possible solutions for your problem are discussed (&lt;a href="/discussions/f/rules/4544/we-have-text-fields-that-we-need-to-validate-are-numbers-for-example-if-the-v"&gt;https://community.appian.com/discussions/f/rules/4544/we-have-text-fields-that-we-need-to-validate-are-numbers-for-example-if-the-v)&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Once you have the approach that you believe works best for your use case, you will need to associate that expression rule to the&amp;nbsp;&lt;span class="ss"&gt;validations property of your Text component.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>