<?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>Time validation in text field</title><link>https://community.appian.com/discussions/f/user-interface/24149/time-validation-in-text-field</link><description>Hi All 
 In an editable grid we used a text field as a time enter field . Currently we want to do validations as follow in the text field 9:02 AM in the editable how to achieve this scenario.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93119?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 13:49:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4020e49a-c306-4e81-b017-83d677622a1f</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;If you&amp;#39;re prepared to force the user to use a fairly strict format, you could use RegEx to validate that the user enters text in the exact format of HH:MM AA.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!24hourmatch: regexmatch(
    /* requires 2-digit hour from 00 thru 23 */
    pattern: &amp;quot;^(0[0-9]|1[0-9]|2[0-3]):[012345]\d$&amp;quot;,
    searchString: ri!timeText
  ),
  
  local!12hourMatch: regexmatch(
    /* requires 1 or 2-digit hour from 1/01 to 12, plus AM or PM (case insensitive) */
    pattern: &amp;quot;^(0?[1-9]|1[012]):[012345]\d [AP]M$&amp;quot;,
    searchString: ri!timeText
  ),
  
  or(
    local!12hourMatch,
    local!24hourmatch
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93117?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 13:35:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:425c4190-4893-486a-9df5-d4281f4de37a</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;This kinda makes me wish they&amp;#39;d finally implement some sort of sideBySideLayout compatibility in an Editable Grid cell, because then this use case could be satisfied by one integer field for HH, one for MM, and a dropdown for AM/PM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93105?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 06:51:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2e6ff5c5-2b5f-4d26-a1d4-851f0c8ea6b2</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;You can use validation in the below manner.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Split the text on semicolon(:) and check there should be 2 values.&amp;nbsp;&lt;br /&gt;On the first value, the integer value should be greater than equal to 0 and lesser than 25.&lt;br /&gt;On the second value, split it again on space( ) and check there should be again 2 values.&amp;nbsp;&lt;br /&gt;The first value should be again in the specific range.&amp;nbsp; The second value should be one of them&amp;nbsp;&lt;br /&gt;AM, PM, am, pm&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93102?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 05:47:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c25546e-0435-4915-aca0-2c017a37182e</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Does this have to be a text field? Would it be sufficient to use a drop down with 30-minute intervals?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93101?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 05:34:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0a511041-c890-44d0-bb90-f2876443b371</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;it would be difficult to implement a validation on a text field&amp;nbsp; like this unless you have proper format for time entered by the user. Also you can use helptooltip to give brief about the time format to be entered by the user.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93100?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 05:25:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:95047c58-ea9e-44e0-91a7-958ed5f779fd</guid><dc:creator>nizara0003</dc:creator><description>&lt;p&gt;Only time we need to show not the date.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93099?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 05:25:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b9653c3b-2294-4cec-b323-7048263ba784</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;Ok. May i know why are you using text field ? is there any restriction on using date field?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93098?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 05:22:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2dcd5735-c4c2-4ef6-86f5-68938bad815d</guid><dc:creator>nizara0003</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;In editable grid we need to have time field in appian we don&amp;#39;t have time field in editable grid. So to have time field i used&amp;nbsp; text field. Now the problem is its accepting all the values. Here i need to check the text field has to accept only time else need to throe some validation message.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Time validation in text field</title><link>https://community.appian.com/thread/93097?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2022 05:18:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:10e26452-3b66-4e88-a6a6-225f7ffb4427</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;hi&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/nizara0003"&gt;nizara0003&lt;/a&gt;, Its difficult to understand your requirement , could you please explain little bit more about your use case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>