Alien username

Published on Tue Mar 01 2022

Input Format The first line contains a single integer, , denoting the number of usernames. Each line of the subsequent lines contains a string denoting an alien username to validate. Constraints Output Format Iterate through each of the strings in order and determine whether or not each string is a valid alien username. If a username is a valid alien username, print VALID on a new line; otherwise, print INVALID. Sample Input 3 _0898989811abced_ _abce _09090909abcD0 Sample Output VALID INVALID INVALID Explanation We validate the following three usernames: _0898989811abced_ is valid as it satisfies the requirements specified above. Thus, we print VALID. _abce is invalid as the beginning _ is not followed by one or more digits. Thus, we print INVALID. _09090909abcD0 is invalid as the sequence of English alphabetic letters is immediately followed by a number. Thus, we print INVALID.

Additional matching regexes for
Alien username

Alien username

Input Format The first line contains a single integer, , denoting the number of usernames. Each line of the subsequent lines contains a string denoting an alien username to validate. Constraints Output Format Iterate through each of the strings in order and determine whether or not each string is a valid alien username. If a username is a valid alien username, print VALID on a new line; otherwise, print INVALID. Sample Input 3 _0898989811abced_ _abce _09090909abcD0 Sample Output VALID INVALID INVALID Explanation We validate the following three usernames: _0898989811abced_ is valid as it satisfies the requirements specified above. Thus, we print VALID. _abce is invalid as the beginning _ is not followed by one or more digits. Thus, we print INVALID. _09090909abcD0 is invalid as the sequence of English alphabetic letters is immediately followed by a number. Thus, we print INVALID.

(krishna)

() invalid, (k) valid, (kr123) valid. only () is invalid

Currency Amount

Format: x0.00 Valid: 13.37 4.20 1.00 Invalid: 13,37 4,20 1,00 1 7.5

Jeff Test

Valid and Invalid emails

IPv4 strict

Valid: 000.01.249.255 1.199.200.0 0.0.0.0 Invalid: 1000..256.300

Match at least One upper, lower, number and Special char.

Determines if string contains: 1 Uppercase 1 Lowercase 1 Number 1 Symbol

Simple Phone Number validation

- Default to `8` characters *maxInput* and *minInput* `14` characters - Regular Expression ```js ^(?![ -])(?!.*[- ]$)(?!.*[- ]{2})[0-9- ]+$ ``` - Allows digits `0-9`, and the `single white spaces` and `single hyphens -` characters, but restricts the *spaces* and *hyphens* at the start, end, and repetitions between the value. - Note the length of the phone number is not validated by the regex but by the *maxInput* and *input* constraints. - The error message for an invalid format, (to be translatable in Ar is supported). > `Please insert a valid contact number`. **Example** - Valid samples: - 0560000000 - 000-000-0-0000 - 056 000-000 00 - Invalid samples: - 056--000--0000 - 0A0-000-0-0000 - 056 000 -000 00

Validate number in format: +xxxxxxxxxxx

Used for number validation in input forms, when number is required to be in international format. You can adjust the required number length by adjusting this part of regex: {6,10}. The bigged the second number, the longer number will pass the match.

Code Review

username

yyyy-MM-dd hh:MM

date format for "yyyy-MM-dd hh:MM" valid strict model.