Did I find the right examples for you? yes no

All Samples(93)  |  Call(55)  |  Derive(0)  |  Import(38)

src/e/r/erp5-HEAD/product/Formulator/Validator.py   erp5(Download)
from urllib import urlopen
from urlparse import urljoin
from Errors import ValidationError
from DateTime.DateTime import DateError, TimeError
import unicodedata
    def raise_error(self, error_key, field):
        raise ValidationError(error_key, field)
 
    def validate(self, field, key, REQUEST):    
        pass # override in subclass
            minute = 0
          elif hour == '' or minute == '':
            raise ValidationError('not_datetime', field)
      else:
        hour = field.validate_sub_field('hour', REQUEST, key=key)

src/g/r/gramps-3.4.2/src/plugins/gramplet/EditExifMetadata.py   Gramps(Download)
from libmetadata import MetadataView, format_datetime
from gui.widgets import ValidatableMaskedEntry
from Errors import ValidationError
from QuestionDialog import QuestionDialog, OptionDialog
 
        """
        if self.dates[field] is None:
            return ValidationError(_('Bad Date/Time'))
 
    def validate_coordinate(self, widget, data, field):
        # validate the Latitude field...
        if field == "Latitude" and not conv_lat_lon(data, "0", "ISO-D"):
            return ValidationError(_(u"Invalid latitude (syntax: 18\u00b09'") +
                                   _('48.21"S, -18.2412 or -18:9:48.21)'))
 
        # validate the Longitude field...
        if field == "Longitude" and not conv_lat_lon("0", data, "ISO-D"):
            return ValidationError(_(u"Invalid longitude (syntax: 18\u00b09'") +

src/g/r/gramps-3.4.2/src/gui/widgets/validatedmaskedentry.py   Gramps(Download)
#
#-------------------------------------------------------------------------
from Errors import MaskError, ValidationError, WindowActiveError
from gui.widgets.undoableentry import UndoableEntry
 
                    else:
                        if text:
                            raise ValidationError()
                else:
                    if not self.is_empty():
    def on_validate(widget, text):
        myDate = parser.parse(text)
        if not myDate.is_regular():
            # used on AgeOnDateGramplet
            return ValidationError(_("'%s' is not a valid date value"))

src/g/r/gramps-3.4.2/src/gui/editors/editplace.py   Gramps(Download)
                         GalleryTab, NoteTab, WebEmbedList, PlaceBackRefList)
from gui.widgets import MonitoredEntry, PrivacyButton
from Errors import ValidationError
from PlaceUtils import conv_lat_lon
from QuestionDialog import ErrorDialog
    def _validate_coordinate(self, widget, text, typedeg):
        if (typedeg == 'lat') and not conv_lat_lon(text, "0", "ISO-D"):
            return ValidationError(_(u"Invalid latitude (syntax: 18\u00b09'") +
                                   _('48.21"S, -18.2412 or -18:9:48.21)'))
        elif (typedeg == 'lon') and not conv_lat_lon("0", text, "ISO-D"):
            return ValidationError(_(u"Invalid longitude (syntax: 18\u00b09'") +

src/g/r/gramps-3.4.2/src/DateEdit.py   Gramps(Download)
import GrampsDisplay
import ManagedWindow
from Errors import ValidationError
from glade import Glade
 
        # if text could not be parsed it is assumed invalid
        if self.date_obj.get_modifier() == Date.MOD_TEXTONLY:
            return ValidationError(_('Bad Date'))
        elif (self.date_obj.to_calendar(calendar_name=Date.CAL_GREGORIAN) >>
              NextYear()):
            return ValidationError(_('Date more than one year in the future'))

src/g/r/gramps-3.4.2/src/gui/editors/editperson.py   Gramps(Download)
import config
from QuestionDialog import ErrorDialog, ICON
from Errors import ValidationError
 
from displaytabs import (PersonEventEmbedList, NameEmbedList, CitationEmbedList,
        if text in validcall:
            return
        return ValidationError(_("Call name must be the given name that "
                                     "is normally used."))
 

src/g/r/gramps-3.4.2/src/gui/editors/editname.py   Gramps(Download)
                     MonitoredDataType, PrivacyButton)
from glade import Glade                     
from Errors import ValidationError
 
#-------------------------------------------------------------------------
        if text in validcall:
            return
        return ValidationError(_("Call name must be the given name that "
                                     "is normally used."))
 

src/e/r/erp5-HEAD/product/Formulator/Form.py   erp5(Download)
from StringIO import StringIO
 
from Errors import ValidationError, FormValidationError, FieldDisabledError
from FieldRegistry import FieldRegistry
from Widget import render_tag

src/e/r/erp5-HEAD/product/Formulator/Field.py   erp5(Download)
import OFS
from Shared.DC.Scripts.Bindings import Bindings
from Errors import ValidationError
from Products.Formulator.Widget import MultiItemsWidget
from zLOG import LOG