2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.propertysheet
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.jface
.viewers
.ICellEditorValidator
;
20 public class DayValidator
implements ICellEditorValidator
{
21 private static final Logger logger
= Logger
.getLogger(DayValidator
.class);
24 * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
27 public String
isValid(Object value
) {
29 String msg
= "Value in day field must be an integer between 1-31.";
31 if (((String
) value
).equals("")) {
37 day
= new Integer((String
) value
);
38 } catch (ClassCastException e
) {
40 } catch (NumberFormatException e
) {
44 if (day
== 0 || day
> 31) {