String (String fieldText) { if (!myPattern.matcher(fieldText).matches()) { return JavaStartersBundle.message("message.only.lowercase.latin.characters.digits.and.some.other.symbols.are.allowed.here"); } if (fieldText.charAt(0) < 'a' || fieldText.charAt(0) > 'z') { return JavaStartersBundle.message("message.must.start.with.lowercase.latin.character"); } return null; }