/*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016 Roland Haeder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import javax.faces.validator.FacesValidator;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
import org.mxchange.jcoreee.validator.string.BaseStringValidator;
* <p>
* @author Roland Haeder<roland@mxchange.org>
*/
+@FacesValidator (value = "AddressbookNameValidator")
public class AddressbookNameValidator extends BaseStringValidator implements Validator {
/**
//this.getLogger().logTrace(MessageFormat.format("validate: context={0},component={1},value={2} - CALLED!", context, component, value)); //NOI18N
// All accepted, required fields
- String[] requiredFileds = {"addressbookName"}; //NOI18N
+ String[] requiredFields = {"addressbookName"}; //NOI18N
- // Pre-validation (e.g. not null, not a string, empty string ...)
- super.preValidate(context, component, value, requiredFileds);
+ // Pre-validation (example: not null, not a string, empty string ...)
+ super.preValidate(context, component, value, requiredFields, false);
// Trace message
//this.getLogger().logTrace("validate: EXIT!"); //NOI18N