FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Rule for validating if a password uses valid special characters / non-alphanumeric characters

    Scheduled Pinned Locked Moved Solved
    Q&A
    password rules valid
    1
    2
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      johnathon
      last edited by

      What is the exact rule you have in place for the password validation rule of special characters / non-alphanumeric characters?

      J 1 Reply Last reply Reply Quote 0
      • J
        johnathon @johnathon
        last edited by

        @johnathon

        These are the steps FusionAuth takes to check whether a password contains special characters:

        1. Convert the Java String to a char[] (a char is a 16-bit unicode value in Java)
        2. Check each character c to determine whether it is a special character using
          !Character.isAlphabetic(c) && !Character.isDigit(c)
        3. If any character in the string returns true for the above check, we consider it to contain a special character
        1 Reply Last reply Reply Quote 0
        • joshuaJ joshua has marked this topic as solved on
        • First post
          Last post