def validate(*args, **kwargs):
    """function to validate the data in kwargs"""
    fields_to_check = args
    errors = []
    for field in fields_to_check:
        if kwargs.get(field) is None or kwargs.get(field).strip() == '':
            errors.append('{} is required and cannot be empty'.format(field))
    return not len(errors) > 0, errors
