I am new to regExp and need to check a password field that accepts 8 to 20 letters.
I have tried str.test or str.match but they return true even when letters can exceed 20.
Is there a native method that can return true/false based on exact match.
RegExp
/.{8,20}/