'check all input params'

def check_params(self):

    if (not self.mask.isdigit()):
        self.module.fail_json(msg='Error:    Mask    is    invalid.')
    if (self.aftype == 'v4'):
        if ((int(self.mask) > 32) or (int(self.mask) < 0)):
            self.module.fail_json(msg='Error:    Ipv4    mask    must    be    an    integer    between    1    and    32.')
        if self.next_hop:
            if (not is_valid_v4addr(self.next_hop)):
                self.module.fail_json(msg=('Error:    The    %s    is    not    a    valid    address' % self.next_hop))
    if (self.aftype == 'v6'):
        if ((int(self.mask) > 128) or (int(self.mask) < 0)):
            self.module.fail_json(msg='Error:    Ipv6    mask    must    be    an    integer    between    1    and    128.')
        if self.next_hop:
            if (not is_valid_v6addr(self.next_hop)):
                self.module.fail_json(msg=('Error:    The    %s    is    not    a    valid    address' % self.next_hop))
    if self.description:
        if (not is_valid_description(self.description)):
            self.module.fail_json(msg='Error:    Dsecription    length    should    be    1    -    35,    and    can    not    contain    "?".')
    if self.tag:
        if (not is_valid_tag(self.tag)):
            self.module.fail_json(msg='Error:    Tag    should    be    integer    1    -    4294967295.')
    if self.pref:
        if (not is_valid_preference(self.pref)):
            self.module.fail_json(msg='Error:    Preference    should    be    integer    1    -    255.')
    if ((self.nhp_interface != 'Invalid0') and (self.destvrf != '_public_')):
        self.module.fail_json(msg='Error:    Destination    vrf    dose    no    support    next    hop    is    interface.')
    if (not self.convert_ip_prefix()):
        self.module.fail_json(msg=('Error:    The    %s    is    not    a    valid    address' % self.prefix))
