Checks whether a given date is that in future or not

@param validationObject
@param annotate
@return
963610
private boolean validateFuture(Object validationObject, Annotation annotate)
    {
        if (checkNullObject(validationObject))
        {
            return true;
        }

        int res = 0;

        if (validationObject.getClass().isAssignableFrom(java.util.Date.class))
        {
            Date today = new Date();
            Date futureDate = (Date) validationObject;

            res = futureDate.compareTo(today);
        }
        else if (validationObject.getClass().isAssignableFrom(java.util.Calendar.class))
        {

            Calendar cal = Calendar.getInstance();
            Calendar futureDate = (Calendar) validationObject;
            res = futureDate.compareTo(cal);

        }
        // else
        // {
        // //ruleExceptionHandler(((Future) annotate).message());
        // throw new RuleValidationException(((Future)
        // annotate).message());
        // }
        if (res <= 0)
        {
            throwValidationException(((Future) annotate).message());
        }

        return true;
    }
803050
private void validateFinishDate(Task task)
   {
      if (task.getFinish() == null)
      {
         Date startDate = task.getStart();
         if (startDate != null)
         {
            if (task.getMilestone())
            {
               task.setFinish(startDate);
            }
            else
            {
               Duration duration = task.getDuration();
               if (duration != null)
               {
                  ProjectCalendar calendar = task.getEffectiveCalendar();
                  task.setFinish(calendar.getDate(startDate, duration, false));
               }
            }
         }
      }
   }
513782
@Override
  public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
    final String valueAsString = Objects.toString(pvalue, null);
    return StringUtils.isEmpty(valueAsString)
        || countCriteriaMatches(valueAsString) >= minRules && !isBlacklist(pcontext, valueAsString)
            && !startsWithDisalowedCharacter(pcontext, valueAsString)
            && !maxRepeatCharacterExceded(pcontext, valueAsString);
  }
979061
protected void initValid(EnhancedAnnotation<T> annotatedAnnotation) {
        this.valid = false;
        for (Class<? extends Annotation> annotationType : getMetaAnnotationTypes()) {
            if (annotatedAnnotation.isAnnotationPresent(annotationType)) {
                this.valid = true;
            }
        }
    }
814284
private boolean validateMaxDecimal(Object validationObject, Annotation annotate)
    {
        if (validationObject != null)
        {
            try
            {
                if (checkvalidDeciDigitTypes(validationObject.getClass()))
                {
                    BigDecimal maxValue = NumberUtils.createBigDecimal(((DecimalMax) annotate).value());
                    BigDecimal actualValue = NumberUtils.createBigDecimal(toString(validationObject));
                    int res = actualValue.compareTo(maxValue);
                    if (res >  0)
                    {
                        throwValidationException(((DecimalMax) annotate).message());
                    }

                }
            }
            catch (NumberFormatException nfe)
            {
                throw new RuleValidationException(nfe.getMessage());
            }

        }
        return true;
    }
734455
private boolean validateNull(Object validationObject, Annotation annotate)
    {
        if (checkNullObject(validationObject))
        {
            return true;
        }

        if (!validationObject.equals(null) || validationObject != null)
        {
            throwValidationException(((Null) annotate).message());
        }

        return true;
    }
343144
@Override
    public boolean isSupported(TemporalField field) {
        if (fieldValues.containsKey(field) ||
                (date != null && date.isSupported(field)) ||
                (time != null && time.isSupported(field))) {
            return true;
        }
        return field != null && (field instanceof ChronoField == false) && field.isSupportedBy(this);
    }
290741
public static void assertNotFinal(final Field field, Class<? extends Annotation> annotation) 
   {
      if (Modifier.isFinal(field.getModifiers()))
      {
         throw annotation == null ? MESSAGES.fieldCannotBeStaticOrFinal(field) : MESSAGES.fieldCannotBeStaticOrFinal2(field, annotation);
      }
   }
1326957
@Override
  public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
    final String valueAsString = Objects.toString(pvalue, null);
    if (StringUtils.isEmpty(valueAsString)) {
      return true;
    }
    if (!StringUtils.isNumeric(valueAsString)) {
      // EAN must be numeric, but that's handled by digits annotation
      return true;
    }
    if (valueAsString.length() != Gtin8Validator.GTIN8_LENGTH
        && valueAsString.length() != Gtin13Validator.GTIN13_LENGTH) {
      // EAN size is wrong, but that's handled by alternate size annotation
      return true;
    }
    // calculate and check checksum (GTIN/EAN)
    return CHECK_GTIN.isValid(valueAsString);
  }
697427
@SuppressWarnings("unchecked")
	private static ValidationFail performFieldValidations(Context context, FieldInfo fieldInfo, View view) {
		// first, we need to check if condition is not applied for all validations on field
		if (fieldInfo.condition != null && fieldInfo.condition.validationAnnotation().equals(Condition.class)) {
			// condition is applied to all validations on field
			boolean evaluation = evaluateCondition(view, fieldInfo.condition);
			if (! evaluation) {
				// go to next field
				return null;
			}
		}

		// field validations
		for (ValidationInfo valInfo : fieldInfo.validationInfoList) {
			final Annotation annotation = valInfo.annotation;
			if (fieldInfo.condition != null && fieldInfo.condition.validationAnnotation().equals(annotation.annotationType())) {
				boolean evaluation = evaluateCondition(view, fieldInfo.condition);

				if (! evaluation) {
					// continue to next annotation
					continue;
				}
			}
			final IFieldAdapter adapter = FieldAdapterFactory.getAdapterForField(view, annotation);
			if (adapter == null) {
				throw new NoFieldAdapterException(view, annotation);
			}

			final Object value = adapter.getFieldValue(annotation, view);
			final boolean isValid = valInfo.validator.validate(annotation, value);

			if (! isValid) {
				final String message = valInfo.validator.getMessage(context, annotation, value);
				final int order = valInfo.validator.getOrder(annotation);

				// no more validations on this field
				return new ValidationFail(view, message, order);
			}
		}
		return null;
	}
319224
private boolean validateMinDecimal(Object validationObject, Annotation annotate)
    {

        if (validationObject != null)
        {
            try
            {
                if (checkvalidDeciDigitTypes(validationObject.getClass()))
                {
                    BigDecimal minValue = NumberUtils.createBigDecimal(((DecimalMin) annotate).value());
                    BigDecimal actualValue = NumberUtils.createBigDecimal(toString(validationObject));
                    int res = actualValue.compareTo(minValue);
                    if (res < 0)
                    {
                        throwValidationException(((DecimalMin) annotate).message());
                    }

                }
            }
            catch (NumberFormatException nfe)
            {
                throw new RuleValidationException(nfe.getMessage());
            }

        }

        return true;
    }
563721
private Calendar getValidFrom() {

        // Get valid from date
        Date validFrom = getModel().getValidFrom();
        if (validFrom == null)
            return null;

        // Convert to midnight within defined time zone
        Calendar validFromCalendar = Calendar.getInstance(getTimeZone());
        validFromCalendar.setTime(validFrom);
        validFromCalendar.set(Calendar.HOUR_OF_DAY, 0);
        validFromCalendar.set(Calendar.MINUTE,      0);
        validFromCalendar.set(Calendar.SECOND,      0);
        validFromCalendar.set(Calendar.MILLISECOND, 0);
        return validFromCalendar;

    }
25762
public static boolean isValid(String date, String pattern) {
        Date d = parseDate(date, pattern);
        return d != null && format(d, pattern).equals(date);
    }
1019543
public FutureData<Validation> validate(String csdl) {
        FutureData<Validation> future = new FutureData<Validation>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(VALIDATE));
        POST request = config.http().POST(uri, new PageReader(newRequestCallback(future, new Validation(), config)))
                .form("csdl", csdl);
        performRequest(future, request);
        return future;
    }
833625
public String handleSimpleAnnotation(String annotation, String value, String validate) {

		if (value == null)
			return "";

		// if validate contains annotation, do nothing
		if (validate != null && validate.toLowerCase().matches(".*@" + annotation.toLowerCase() + ".*"))
			return "";

		String result = " @" + annotation;

		// if validate contains named annotation parameters
		if (value.toLowerCase().matches(".*value.*") || value.toLowerCase().matches(".*message.*")) {
			result += "(" + value + ") ";
			return result + " ";
		}

		// a simple annotation only has parameters value and message
		String[] params = value.split(",");
		if (params.length == 1)
			result += "(" + params[0] + ")";
		if (params.length == 2)
			result += "(value=" + params[0] + ", message=" + params[1] + ")";

		return result + " ";
	}
452447
public static function checkDateNotFuture($date)
    {
        $current = date('Y-m-d\TH:i:s.00\Z', time());

        if ($date != null && $date > $current) {
            throw new HpsInvalidRequestException(
                HpsExceptionCodes::INVALID_DATE,
                'Date cannot be in the future'
            );
        }
    }
311291
public static <T extends MPBase> boolean validate(T objectToValidate) throws MPValidationException {
        Collection<ValidationViolation> colViolations = validate(new Vector<ValidationViolation>(), objectToValidate);
        if (!colViolations.isEmpty()) {
            throw new MPValidationException(colViolations);
        }
        return true;
    }