function check_name(string) {
    return (string.length < 3 && !/^(ян|ли|ан|ус)$/i.test(string)) ||
           // Check ".", ",", "*" and digits
           /[\*\d\.,]/.test(string) ||
           // Check for two "-" in a row
           /--/.test(string) ||
           // Check for 3 identical symbols in a row
           /(.)\1{2}/.test(string);
  }
// Check first and lastnames, if returns true - check failed
Check first and lastnames, if returns true - check failed
Check first and lastnames if returns true - check failed
function check_name(string) {
    return (string.length < 3 && !/^(ян|ли|ан|ус)$/i.test(string)) ||
           /[\*\d\.,]/.test(string) ||
           /--/.test(string) ||
           /(.)\1{2}/.test(string);
  }
function check_name ( string ) { return ( string . length < 3 && ! / ^(ян|ли|ан|ус)$/i.test( s t r ing) )  || / [\*\d\.,] / . test ( string ) || / -- / . test ( string ) || / (.)\1{2} / . test ( string ) ; }
Check first and lastnames, if returns true - check failed
Check first and lastnames if returns true - check failed
// Check ".", ",", "*" and digits // Check for two "-" in a row // Check for 3 identical symbols in a row