DataSourceTextField firstNameField = new DataSourceTextField("firstName", "First Name", 50, true);
DataSourceTextField lastNameField = new DataSourceTextField("lastName", "Last Name", 50, true);
DataSourceTextField emailField = new DataSourceTextField("email", "Email", 100, true);
RegExpValidator emailValidator = new RegExpValidator();
emailValidator.setErrorMessage("Invalid email address");
emailValidator.setExpression("^([a-zA-Z0-9_.\\-+])+@(([a-zA-Z0-9\\-])+\\.)+[a-zA-Z0-9]{2,4}$");
emailField.setValidators(emailValidator);
DataSourcePasswordField passwordField = new DataSourcePasswordField("password", "Password", 20, true);