not_regex
Validates that the value does not match a regular expression.
Usage
vue
<VfText name="username" label="Username" rules="not_regex:/\s/" />vue
<template>
<VfText name="username" label="Username" rules="not_regex:/\s/" />
</template>ts
{
username: {
type: 'text',
label: 'Username',
rules: 'not_regex:/\\s/',
},
}Parameters
| Parameter | Description |
|---|---|
pattern | The regular expression in /pattern/flags form. |
Behavior
A pattern= prefix is also supported and is optional. The rule fails closed: when the pattern is missing or malformed, no value passes, and a warning is logged in development.
Error Messages
| Key | Default Message |
|---|---|
rule_not_regex_error | The {attribute} format is invalid. |