Input Helper Test Mode

Unified testing environment for library versions.

Library Version:

Decimal Numbers NEW

Numeric input that allows a single decimal point.

<input type="text" data-decimal="2">
<input type="text" data-decimal="2" data-max="5">

Credit Card NEW

Auto-formats 16-digit card numbers (XXXX-XXXX-XXXX-XXXX).

<input type="text" data-cc>

Time Format NEW

Simple time formatting (HH:MM).

<input type="text" data-time>

Slug Generator NEW

Converts text to URL-friendly slug (lowercase, dashes).

<input type="text" data-slug>

Text Casing NEW

Auto-formatting for Title Case, UPPERCASE, and lowercase.

data-title, data-upper, data-lower

Letters Only NEW

Restrict input into English letters only (No numbers, No spaces, No symbols).

<input type="text" data-alpha>

Class Format NEW

Formatting for Class/Year (e.g. 1/2).

<input type="text" data-class>

Text Only (Mixed) SHARED

Allows English (a-z) and Thai (ก-๙) characters and spaces.

<input type="text" data-text>

Max Length SHARED

Limits the number of characters allowed.

<input type="text" data-max="5">
<input type="text" data-max="2">

Numbers Only SHARED

Restricts input to numeric characters only.

<input type="text" data-number>
<input type="text" data-number data-max="4">

Phone Number SHARED

Auto-formats to standard mobile number pattern (XXX-XXX-XXXX).

<input type="text" data-phone>

Thai National ID SHARED

Formats input as a standard 13-digit Thai ID card number.

<input type="text" data-thaiid>

Money Format SHARED

Automatically adds comma separators for thousands.

<input type="text" data-money>

Password Strength (Visual) SHARED

Changes border color based on length (Red < 8, Green>= 8).

// Requires manual binding
el.addEventListener('input', () => passStrength(el));