Validate Alphanumeric

Check if a string contains only letters and numbers.

Code

Utilities
/^[a-zA-Z0-9]+$/.test(str);

Parameters

String to validate.

Browser·fetch() may be limited by CORS

More JavaScript Snippets