ValidationObject
ValidationObject:
object
Type declaration
caseSensitive?
optional
caseSensitive:boolean
Whether to check case sensitivity (i flag)
global?
optional
global:boolean
Whether to check global strings (g flag)
message
message:
string
Error message shown to user if validation fails
Example: "Invalid email format"
multiline?
optional
multiline:boolean
Whether to check Multiline strings (m flag)
regExp
regExp:
string
Should be pure string (not RegExp string)
Example:
// regex for email
regExp: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',