Validating user input January 24, 2024 17:37 Updated Index: Identifying user input Enable and select the type of validation Complete the validation statement During several moments in the interaction of a contact with your chatbot, it may be necessary to validate the user's entry and only allow the contact to continue the flow when presenting a valid response. Identifying user input Whenever a block in the "Awaiting Response" flow, this response is a user input. So, to validate this entry, first, we need to click on it. When clicking on user input, an option menu is opened with the option "VALIDATE USER ENTRY". Enable and select the type of validation Initially, enable the option "VALIDATE USER ENTRY" and select the type of validation. Text: This type of validation checks whether the user input presented is text. This includes numbers, scores, special characters, among others. Validation is mostly used to stop situations where the user sends audio, images, and other media content. Number : In turn, the number validation verifies if the user input presented is a numeral. This includes whole numbers, positive, negative, and decimal (separated by a semicolon). Date: The date validation, determines if the user input presented is a date. This includes different date formats, such as: dd/mm/yyyy, mm/dd/yyyy, dd-mm-yyyy, mm-dd-yyyy, dd-mm, dd/mm, mm-dd, mm-dd, mm-dd-yy ... Regular Expression: With regard to validation by regular expression, it is possible to state that this type of validation is one of the most powerful validations, below are some examples of this validation. CNPJ: Is it possible to use a regular expression as a filter for the entered content? For example, can you validate if the user specifically entered the CNPJ in the desired format (00.000.000/0000-00) with dots and dashes?" CPF: ^ \ d {3}.? \ D {3}.? \ D {3} -? \ D {2} $ E-mail: ^( Renda\w.-▪+)@(gb\w-▪+)((.(\w){2,3})+)$ Postcode: ^ \ d {5} - \ d {3} $ Phone: ^ [1-9] {2} - [2-9] [0-9] {7.8} $ Type Finally, the type validation, verifies if the user input matches a content type corresponding to the Lime Protocol, click here to understand more about these types of content. Complete the validation statement The value of this field will always be presented to the user in case the validation value is false. In turn, if the validation is positive, the flow proceeds normally. For more information, visit the discussion on the subject in our community or the videos on our channel. 😃 Related articles Builder variables Exit Conditions in the Builder Action: HTTP request How to identify users coming from a Click to Chat WhatsApp ad published on Facebook How to configure a destination block by variable