How can I validate a password input?

  • scotlnd21-1357251555706929265

    scotlnd21

    1 month ago

    Hey all,

    I'm trying to ensure that when a user enters a password, it must contain atleast:

    - 1 Lowercase character (abc)
    - 1 Uppercase character (ABC)
    - 1 Number (123)
    - 1 Special character (!@#)

    Would someone be able to give me some suggestions? I know there's the "pattern" attribute I can use on an input, but I'm not sure if that would work in Toddle. If that doesn't work, does anyone have a solution that's more toddly?
  • lucasg-1357715632069677257

    Lucas G

    1 month ago

    You can use regex
  • ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#])$
    ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#]).{8,}$ if you want min 8 chars
  • With a match node
  • You can also use a custom formula
  • scotlnd21-1360134278301745252

    scotlnd21

    1 month ago

    Sorry I didn't respond! Thank you for this!
    👍1