import typing

def validate(request, schema, field, value, mode=None) -> typing.Optional[str]:
    """ Validate data. 

    Returns error message if fail.
    Returns None if no errors

    """
    return 
