//^[a-zu00C0-u02AB'´`]+.?s([a-zu00C0-u02AB'´`]+.?s?)+$
function isValidName(myval) {
var validCharactersRegex = /^[a-zu00C0-u02AB'´`]+.?s([a-zu00C0-u02AB'´`]+.?s?)+$/;
return validCharactersRegex.test(myval.trim());
}
console.log(/^([a-z0-9]{5,})$/.test('abc1')); // false
console.log(/^([a-z0-9]{5,})$/.test('abc12')); // true
console.log(/^([a-z0-9]{5,})$/.test('abc123')); // true
Run code snippet