def validate_vecpairs(veca, vecb, axis):
    """Validate the input form of vector pair functions."""
    if veca.shape != vecb.shape:
        raise ValueError(
            '`veca` and `vecb` must have the same shape, but have shapes: {} and {}.'
            .format(veca.shape, vecb.shape))
    if axis >= veca.ndim:
        raise ValueError(
            '`veca` and `vecb` have {} dimensions, but axis is: {}.'.format
            (veca.ndim, axis))
    if veca.shape[axis] != 3:
        raise ValueError(
            'The `axis` ({}) dimension of `veca` and `vecb` must define the axis along which the three-vectors are defined and must have length 3, but have length {}.'
            .format(axis, veca.shape[axis]))
