json
| Category | String Format |
| Related | string |
| Bundle size | 200 B |
Validates that the value is a valid JSON string.
Usage
vue
<VfTextarea name="payload" label="Payload" rules="json" />vue
<template>
<VfTextarea name="payload" label="Payload" rules="json" />
</template>ts
{
payload: {
type: 'textarea',
label: 'Payload',
rules: 'json',
},
}Error Messages
| Key | Default Message |
|---|---|
rule_json_error | The {attribute} must be a valid JSON string. |