예제 #1
0
  /**
   * 入力チェックを行う.
   *
   * @return 入力チェック結果
   */
  @Override
  public ValidateErrors validate() {

    final ValidateErrors errors = new ValidateErrors();

    errors.addAll(loginId.validate());
    errors.addAll(password.validate());

    return errors;
  }
예제 #2
0
  /**
   * 入力情報の検証を行う.
   *
   * @return 検証結果
   */
  @Override
  public ValidateErrors validate() {

    final ValidateErrors errors = new ValidateErrors();

    if (isRequiredError()) {

      errors.add(new ValidateError(ErrorInfo.Required, requiredSetting.label()));
    }

    if (isMaxLengthError()) {

      final Object[] messageParam = {maxLengthSetting.label(), maxLengthSetting.value()};
      errors.add(new ValidateError(ErrorInfo.MaxLengthOver, messageParam));
    }

    if (isValidCharcterError()) {

      errors.add(new ValidateError(ErrorInfo.InvalidCharacters, validCharSetting.label()));
    }

    return errors;
  }
  /**
   * 入力情報の検証を行う.
   *
   * @return 検証結果
   */
  @Override
  public ValidateErrors validate() {

    final ValidateErrors errors = new ValidateErrors();

    errors.addAll(review.getGoodPoint().validate());
    errors.addAll(review.getBadPoint().validate());
    errors.addAll(review.getComment().validate());
    errors.addAll(review.getScore().validate());

    final ValidateError gameValidateError = validateRelationGame();
    if (gameValidateError != null) {

      errors.add(gameValidateError);
    }

    return errors;
  }