def validate_non_empty_string(value, msg=_L("Required field")):
    # strip whitespace characters
    return validator.StringValidator(value, strip=True).not_empty(_(msg)).to_string()
Check that the value is a non-empty string
dataset/ETHPy150Open Net-ng/kansha/kansha/validator.py/validate_non_empty_string