All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.emv.qrcode.validators.mpm.MerchantAccountInformationReservedValidator Maven / Gradle / Ivy

There is a newer version: 0.1.2
Show newest version
package com.emv.qrcode.validators.mpm;

import static br.com.fluentvalidator.predicate.StringPredicate.stringSizeBetween;

import com.emv.qrcode.model.mpm.MerchantAccountInformationReserved;

import br.com.fluentvalidator.AbstractValidator;

// @formatter:off
class MerchantAccountInformationReservedValidator extends AbstractValidator {

  @Override
  public void rules() {

    ruleFor(MerchantAccountInformationReserved::getValue)
      .must(stringSizeBetween(1, 99))
        .withFieldName("value")
        .withMessage("MerchantAccountInformation value must be between one and ninety-nine")
        .withAttempedValue(MerchantAccountInformationReserved::getValue)
        .critical();
  }

}
// @formatter:on




© 2015 - 2024 Weber Informatics LLC | Privacy Policy