arxiv.submission.domain.event.validators module

Reusable validators for events.

arxiv.submission.domain.event.validators.cannot_be_primary(event, category, submission)[source]

The category can’t already be set as a primary classification.

Return type

None

arxiv.submission.domain.event.validators.cannot_be_secondary(event, category, submission)[source]

The same category cannot be added as a secondary twice.

Return type

None

arxiv.submission.domain.event.validators.must_be_a_valid_category(event, category, submission)[source]

Valid arXiv categories are defined in arxiv.taxonomy.

Return type

None

arxiv.submission.domain.event.validators.no_active_requests(event, submission)[source]
Return type

None

arxiv.submission.domain.event.validators.no_trailing_period(event, submission, value)[source]

Verify that there are no trailing periods in value except ellipses.

Return type

None

arxiv.submission.domain.event.validators.submission_is_not_finalized(event, submission)[source]

Verify that the submission is not finalized.

Parameters
Raises

InvalidEvent – Raised if the submission is finalized.

Return type

None