JSFiddle - React, Tailwind, and code Playground
JavaScript
var text = '1Fcn7M1AjgA9RFPm59RqiTCCD6tKKS5vN9';
if (text.length < 25 || text.match(/[^123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+/g)) {
alert('error');
} else {
alert('correct');
}