Validate the field when its value change.

        :param field: The field.
        :param list_attribute: The list attribute of field with validation.

def _validate(self, field, list_attribute):
        """
        Validate the field when its value change.

        :param field: The field.
        :param list_attribute: The list attribute of field with validation.
        """

        if not self.scripts_added:
            self._generate_validation_scripts()
        self.id_generator.generate_id(field)
        self.script_list_fields_with_validation.append_text(
            'hatemileValidationList.'
            + list_attribute
            + '.push("'
            + field.get_attribute('id')
            + '");'
        )