<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_matches(other):
 """ Validate the field value is equal to another field in the data. Should work with anything that supports '==' operator. :param value: Field key to compare. :raises: ``ValidationError('matches')`` """

    def matches_validator(field, data):
        if field.value is None:
            return
        if not (field.value == data.get(other)):
            raise ValidationError('matches', other=other)
    return matches_validator