INNER CODE UNIT · Python

m_field

Scille/umongo · src/umongo/abstract.py:205

                m_field = m_class(**field_kwargs, metadata=self.metadata)
                # Add i18n support to the field
                m_field.error_messages = I18nErrorDict(m_field.error_messages)
                return m_field
        # Cannot escape the loop given BaseField itself inherits marshmallow's Field


class BaseValidator(ma.validate.Validator):
    """All validators in umongo should inherit from this base validator."""

    def __init__(self, *args, **kwargs):
        self._error = None
        super().__init__(*args, **kwargs)

    @property
    def error(self):
        return _(self._error)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…