Class UinValidatorImpl

  • All Implemented Interfaces:
    UinValidator<String>

    @Component
    public class UinValidatorImpl
    extends Object
    implements UinValidator<String>
    Class for validate the Given UIN in String format
    Since:
    1.0.0
    Author:
    Megha Tanga
    • Constructor Detail

      • UinValidatorImpl

        public UinValidatorImpl()
    • Method Detail

      • validateId

        public boolean validateId​(String id)
        Method used for Validate UIN against acceptance Criteria
        Specified by:
        validateId in interface UinValidator<String>
        Parameters:
        id - pass a UIN in String format example : String inputFile = "201308710214"
        Returns:
        boolean True If entered is Valid else it will throw an error
        Throws:
        InvalidIDException - If entered UIN is empty or null.
        InvalidIDException - If entered UIN contain any sequential and repeated block of number for 2 or more than two digits",
        InvalidIDException - If entered UIN length should be specified number of digit.
        InvalidIDException - If entered UIN contain any alphanumeric characters
        InvalidIDException - If entered UIN should not match with checksum
        InvalidIDException - If entered UIN contain Zero or One as first Digit.