It is possible to hav many Custom rules?

Is it possible to have many custom rules? For example, one for the regex and another for the length (bearing in mind that the message will be seen in Spanish)
image

Hey @Chard_Hermandez, this isn't very easily possible directly inside of the Custom rule field, however, would using a standalone JS transformer work instead?

I wonder if you could write all the JS you want in the transformer and then reference the return value of the transformer inside of your custom rule field!

can you show me one example, please?

Basically, if you create a new JS transformer, you can write your logic like:

if (textInput15.value.length < 15) {
return “too short”
} else if (textInput15.value.length > 15) {
return “too long”
} else {
return “string is perfect!”
}

https://docs.retool.com/docs/transformers

https://docs.retool.com/docs/retool-fundamentals-lesson-five

Let me know once you have this set up and I’m happy to answer any questions you have :relaxed: