I'm trying to build a script without success which validates or not the number of characters to be typed. Example: the "sus" variable is where numeric data will be captured, such data must contain exactly 15 characters. After the data capture block, I added the "Set variable" block and inserted the JS there and it didn't work, I also tried using the script block and it didn't work either. Here's the script I'm using...
// This code must be placed inside the "Script" block in Typebot if (sus.length === 15) { SusTratado = sus; // Armazena o número do cartão SUS na variável 'SusTratado' } else { SusTratado = "Sus Inválido"; // Armazena a mensagem "Sus Inválido" na variável 'SusTratado' }