How to implement restrictions on characters, size etc in Input type=Text

New Member


I have a text box input where a user is supposed to enter certain details. Is there a way to restrict the number and type of characters entered in the text box to ensure all data entered is valid data and not junk data.


Tags (1)
0 Karma


You can use javascript like the following in your application.js:

$("input").attr("maxlength", 4)

Here is a demo:

0 Karma
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...