Omitir navegación
Ampliar
  • Búsqueda avanzadaAbre un nuevo diálogo
    Ingrese los signos mas (+) o menos (-) en los términos de búsqueda para incluir o excluir la palabra requerida
    Consejos de búsqueda
    Filtrar por producto
    Filtrar por categoría
Field Validation in the Web Chat for Service widget
ID de respuesta 12939   |   Revisado 07/05/2025

How do I set field validation for WCFS?

Environment
Chat
Oracle B2C Service
Web Chat for Service component version 24.10 (minimum required version)
 
Resolution
 
Starting with the 24.10 WCFS component, it is now possible to set the pattern attribute within the Pre Launch Form Field Data menu, for the standard fields and the custom fields of type text with a regular expression, to determine if the value of the field is valid.
 
If the text entered is not in the valid format, the field will change the border color and a message will be displayed. The default message is Please match the required format, but you can add a custom message by adding a key that is the concatenation of the field name and the word Message within the Custom Strings.  
 
Below is a basic example
 

 

For a complete guide on how to create and set up custom fields in WCFS see Answer ID 12816: Using Custom Fields in the Web Chat for Service widget

Please note that for standard fields the custom message string must not include 'plf' either. For example, to add a message for the First Name field validation, the Custom String should be added as in the screenshot below:

Note: If you are using a rule for Web Chat: Reset Pre Launch Form Fields, make sure that the JSON in the rule includes the "customFieldType": "text". Otherwise, the application will not apply the field validation. 

e.g.

[
 ...,
 {
   "customFieldType": "text",
   "name": "text_field",
   "required": false,
   "relaunchValue": "default",
   "pattern":"[0-9]{11}"
 }
]

Notificarme
La página se refrescará al enviar. Las entradas pendientes se perderán.