* @author Roland Haeder<roland@mxchange.org>
*/
public abstract class BaseStringValidator extends BaseObjectValidator {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 15_484_578_781_760_287L;
@Override
protected void preValidate (final FacesContext context, final UIComponent component, final Object value, final String[] requiredFields) throws ValidatorException {
// Compare value's type
if (!(value instanceof String)) {
// Value is empty
- errKey = String.format("error.%s.is_not_string", field); //NOI18N
+ errKey = String.format("ERROR_%s_IS_NOT_STRING", field.toUpperCase()); //NOI18N
facesMessage = new FacesMessage(getMessageStringFromKey(errKey));
}
// Is it empty?
if (str.isEmpty()) {
// Value is empty
- errKey = String.format("error.%s.is_empty", field); //NOI18N
+ errKey = String.format("ERROR_%s_IS_EMPTY", field.toUpperCase()); //NOI18N
facesMessage = new FacesMessage(getMessageStringFromKey(errKey));
}