Class VidValidatorImpl

java.lang.Object
io.mosip.kernel.idvalidator.vid.impl.VidValidatorImpl
All Implemented Interfaces:
VidValidator<String>

@Component public class VidValidatorImpl extends Object implements VidValidator<String>
Class to validate the VID
Since:
1.0.0
Author:
M1037462, Megha Tanga
  • Constructor Details

    • VidValidatorImpl

      public VidValidatorImpl()
  • Method Details

    • validateId

      public boolean validateId(String id)
      Method used for Validate VID against acceptance Criteria
      Specified by:
      validateId in interface VidValidator<String>
      Parameters:
      id - pass a VID in String format example : String inputFile = "426789089018"
      Returns:
      true if entered VID is valid
      Throws:
      InvalidIDException - If entered VID is empty or null.
      InvalidIDException - If entered VID contain any sequential and repeated block of number for 2 or more than two digits",
      InvalidIDException - If entered VID length should be specified number of digits.
      InvalidIDException - If entered VID contain any alphanumeric characters
      InvalidIDException - If entered VID should not match with checksum
      InvalidIDException - If entered VID contain Zero or One as first Digit.