Leopard Chat Client
  • Quick Start
  • Screenshots
  • Setup
    • Extension Helper
    • Context Variables
      • Greeting Message
      • Channel
      • User's Time Zone
      • Location Context Parameters
    • Build Variables
  • Content Styling
    • CSS Styles
    • Icons
    • Markdown & HTML
  • Components Simple Syntax
  • Components
    • Answer Borders
    • Audio Player
    • Auto Open Leopard with Link
    • Alerts
    • Buttons and Lists
    • Card
    • Response Icons
    • Date & Time Pickers
    • Emergency Button
    • Expensive Operations
    • Field Masks
    • Chat Field Types (Email, Password, Location, Upload)
    • Forms
      • Feedback Form
      • Custom Forms
        • Example Config
        • Postback Object
        • Button Object
        • Field Types
        • Style Object
        • Icons Object
        • Masks
        • Validation
    • Google Map
    • Help Text
    • HTML Modal
    • Hyperlinks
    • Images
      • Image
      • Image Carousel
    • Tables
      • Tables - Simple
      • Tables - Advanced
    • Theme Change
    • Toasts
    • Language Auto Switch
    • Minimize Chat after Delay
    • Multiple Components - Same Response
    • Modal Size & Positioning
    • Open Long Response in Modal
    • Print Icon
    • Prompt Trigger Polling
    • Splitting Answers - Chunks
    • Video Player
  • Administration Area
    • Solution Configuration
    • Demo Mode - iFrames & URLs
    • ASR and TTS
  • Integrations
    • Logging / Reporting
    • Social Authentication
    • Live Chat
  • Embedding / Production
Powered by GitBook
On this page
  • VeeValidate
  • Example Rules
  1. Components
  2. Forms
  3. Custom Forms

Validation

You can apply a set of custom validations against any of the form fields that accept input.

PreviousMasksNextGoogle Map

Last updated 5 years ago

You can apply a set of custom validations against any of the form fields that accept input. The validation rules are provided by VeeValidate and there are a large set of available validations that can be chained together. To chain validations together separate them with a pipe sign |

VeeValidate

is used for validations. You have a wealth of configurable validations that can be chained together. A full listing of validations can be .

Example Rules

Rule

Description

required|min:5

required|between:1,11

Required and the field under validation must have a numeric value bounded by a minimum value and a maximum value.

digits:3

The field under validation must be numeric and have the specified number of digits.

email

The field under validation must be a valid email.

oneOf:1,2,3

The field under validation must have a value that is in the specified list. Uses double equals for checks.

is:CONFIRM

The field under validation must be equal to the first argument passed, uses === for equality checks. Note that using the string format will cause any arguments to be parsed as strings, so use the object format when using this rule.

max:4

The field under validation length may not exceed the specified length.

max_value:4

The field under validation must be a numeric value and must not be greater than the specified value.

min:4

The field under validation length should not be less than the specified length.

min_value:4

The field under validation must be a numeric value and must not be less than the specified value.

numeric

The field under validation must only consist of numbers.

regex: /^[0-9]+$/

The field under validation must match the specified regular expression.

required

The field under validation must have a non-empty value. By default, all validators pass the validation if they have "empty values" unless they are required. Those empty values are: empty strings, undefined, null, empty arrays.

required_if:country,US

The field under validation must have a non-empty value only if the target field (first argument) is set to one of the specified values (other arguments).

VeeValidate
found here