Primitive
data.validatePattern
BETAShort name: validatePattern
Version: 1.0.0
Validate that a string matches a provided regular expression.
Back to primitive libraryInputs
| Key | Type | Required | Description |
|---|---|---|---|
| flags | string | false | Optional regex flags from gimsuy. |
| pattern | string | true | Regular expression source string (max length 256). |
| value | any | false | Value to validate as a string. |
Outputs
| Key | Type | Required | Description |
|---|---|---|---|
| ok | boolean | false | True when value is a string and matches the regex. |
| reason | string | false | Failure reason when ok is false. Empty string when ok is true. |