model/src/main/java/eu/internetofus/common/model/ValidateContext.java
/**
   * Validate that a number value is on the specified range.
   *
   * @param fieldName name of the checking field.
   * @param value     to verify.
   * @param promise   to notify of any error.
   */
Validate that a number value is on the specified range.
@param fieldName name of the checking field.
@param value     to verify.
@param promise   to notify of any error.
Validate that a number value is on the specified range . @param fieldName name of the checking field . @param value to verify . @param promise to notify of any error .
default void validateTimeStampField(final String fieldName, final Long value, final Promise<Void> promise) {
    if (value == null) {
      promise.tryFail(
          new ValidationErrorException(this.fieldErrorCode(fieldName), "The '" + value + "' has to be defined."));
    } else if (value < 0) {
      promise.tryFail(new ValidationErrorException(this.fieldErrorCode(fieldName),
          "The '" + value + "' is not valid time stamp because is less than '0'."));
    }
  }
default void validateTimeStampField ( final String fieldName , final Long value , final Promise < Void > promise ) { if ( value == null ) { promise . tryFail ( new ValidationErrorException ( this . fieldErrorCode ( fieldName ) , "The '" + value + "' has to be defined." ) ) ; } else if ( value < 0 ) { promise . tryFail ( new ValidationErrorException ( this . fieldErrorCode ( fieldName ) , "The '" + value + "' is not valid time stamp because is less than '0'." ) ) ; } }
Validate that a number value is on the specified range.
Validate that a number value is on the specified range .