Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Add a single-line input field with validation for a phone number in the format (123) 456-7890 using the pattern attribute.

Hard

Problem Statement

Add a single-line input field with validation for a phone number in the format (123) 456-7890 using the pattern attribute.

Sample Input

A phone input field with validation.

Sample Output

The webpage displays an input field that only accepts phone numbers in a specific format.

Limits

Time: 2s · Memory: 256 MB

Code Editor

Try your code in this preview. Submit marks it done.

<!doctype html> <html></html>

Document

To view the HTML changes, please type the code within the editor