ui/src/main/java/thredds/ui/datatype/prefs/DurationField.java
protected boolean _validate( StringBuffer buff) {
    String editValue = tf.getText().trim();
    if (editValue.length() == 0) return true; // empty ok

    try {
      new TimeDuration( tf.getText());
      return true;
    } catch (java.text.ParseException e) {
      buff.append(label).append(": ").append(e.getMessage());
      return false;
    }
  }
protected boolean _validate( StringBuffer buff) {
    String editValue = tf.getText().trim();
    if (editValue.length() == 0) return true; // empty ok

    try {
      new TimeDuration( tf.getText());
      return true;
    } catch (java.text.ParseException e) {
      buff.append(label).append(": ").append(e.getMessage());
      return false;
    }
  }
protected boolean _validate ( StringBuffer buff ) { String editValue = tf . getText ( ) . trim ( ) ; if ( editValue . length ( ) == 0 ) return true ; // empty ok try { new TimeDuration ( tf . getText ( ) ) ; return true ; } catch ( java . text . ParseException e ) { buff . append ( label ) . append ( ": " ) . append ( e . getMessage ( ) ) ; return false ; } }
See if edit value is valid, put error message in buff.
See if edit value is valid put error message in buff .