Dear NetBeans Mailing List user,I am getting a invalidating email. I am using an Apache email validation class. I have attached the tar file of my project. Following is the error
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project ValidateName3: Fatal error compiling: error: release version 11.0.19 not supported -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Email Validation in Java | Baeldung | | | | | | | | | | | Email Validation in Java | Baeldung Learn how to validate email addresses in Java using regular expressions. | | | package com.mycompany.validatename; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.validator.*; import org.apache.commons.validator.routines.InetAddressValidator; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.swing.JOptionPane; import javax.swing.UnsupportedLookAndFeelException; public class ValidateNameForm extends javax.swing.JFrame { /** * Creates new form ValidateNameForm */ public ValidateNameForm() { : : } private void jTF1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void CheckIfInputValid(String input, String regex){ String s; //for(int i=0; i<4; ++i) { Pattern pattern = Pattern.compile(regex); s = input.trim(); Matcher matcher = pattern.matcher(s); JOptionPane.showMessageDialog(null, "Input "+s+" is valid " + String.valueOf(matcher.matches())); //} } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String emailAddress= jTF1.getText(); //String strInput[] = new String[5]; //strInput[0]= strAccName; //String regex = "^[a-zA-Z]*$"; //String emailRegex = regexArr[2] = "[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*(\\.[a-zA-Z]{1,6}))?"; boolean isValidEmail = EmailValidator.getInstance().isValid(emailAddress); //CheckIfInputValid(strInput[0], emailRegex); } /** * @param args the command line arguments */ public static void main(String args[]) { } // Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JTextField jTF1; // End of variables declaration //private void initComponents() { // throw new UnsupportedOperationException( "Not supported yet." ); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody // } } Somebody please guide me. Zulfi.
ValidateName3 (copy).tar.xz
Description: application/xz
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists