@classmethod
def validate(cls, value):
    """
        Validate method is automatically called pydantic.
        """
    addr = cls._get_addr(value)
    mask = cls._get_mask(value)
    rdid = cls._get_rdid(value)
    cls._validate_rdid(rdid)
    if mask:
        cls._validate_ip(f'{addr}/{mask}')
    else:
        cls._validate_ip(addr)
    return cls(f'{value}')
