How To in Jdeveloper ADF – To have hour and Time format restriction for inputText


Scenario:

How to have a Time format restriction for the adf inputText component?

Solution:

To have the time format restriction to restrict the time for upto 23:59 we will have a regex pattern for the af:inputText

<af:inputText label="" id="time" simple="true" value="" contentStyle="width:30px;" maximumLength="5">
<af:validateRegExp pattern"([01][0-9]|2[0-3]):[0-5][0-9]" messageDetailNoMatch="Time Format must match HH:MM" hint="Time Format: HH:MM"/>
</af:inputText>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s