How can I validate regex for full name? I only want alphabets (no numericals) and only spaces for the regex. This is what I have done so far. Would you please help me fix th
This method validate the name and return false if the name has nothing or has numbers or special characters:
public static boolean isFullname(String str) { String expression = "^[a-zA-Z\\s]+"; return str.matches(expression); }