I'm trying to validate a text field using IF statements.
When I use:
if(fname.getText().matches("[a-z]") || fname.getText().matches("[A-Z]")) {
grid1.getChildren().remove(labelstar1);
}
It only matches one character. How do I make it validate so it matches with a string of characters with no specific length?
Any help/thoughts would be appreciated!