Class CountryCodeConstraintValidator

    • Constructor Detail

      • CountryCodeConstraintValidator

        public CountryCodeConstraintValidator​(CountryCode.Format format)
        Creates the default instance of CountryCodeConstraintValidator with the specified country code format.
        Parameters:
        format - the specified country code format
        Throws:
        io.rxmicro.common.ImpossibleException - if country code format is unsupported
    • Method Detail

      • validate

        public void validate​(String actual,
                             HttpModelType httpModelType,
                             String modelName)
        Description copied from interface: ConstraintValidator
        Validates the single actual.

        The state of the actual must not be altered.

        Specified by:
        validate in interface ConstraintValidator<String>
        Parameters:
        actual - the actual value to validate
        httpModelType - the http model type
        modelName - the parameter or header name