How to use the idutils.doi_regexp function in idutils

To help you get started, we’ve selected a few idutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github inspirehep / inspire-next / inspirehep / modules / forms / validation_utils.py View on Github external
def __call__(self, form, field):
        """Validate.

        :param field: validated field.
        :param form: validated form.
        """
        doi = field.data
        if doi and not doi_regexp.match(doi):
            # no point to further validate DOI which is invalid
            raise StopValidation(self.message)