Example #1
0
    def validateMore(self, adding, record, ndx, errs):
        def addError(msg):
            errs.append((ndx + 1, msg))

        super(Policy, self).validateMore(adding, record, ndx, errs)

        if isBadNum(record["PREMIUM"], True):
            addError("PREMIUM is not a number")
        if isBadNum(record["LIMIT"]):
            addError("LIMIT is not a number")
        if isBadNum(record["RETENTION"]):
            addError("RETENTION is not a number")

        if isBadDate(record["INCEPTION"]):
            addError("INCEPTION is not a date")
        if isBadDate(record["EXPIRATION"]):
            addError("EXPIRATION is not a date")
        pnum = record["POLICY_NUMBER"].strip()
        if pnum != "":
            self.policyNumbers[pnum] = ndx + 1
        return
Example #2
0
    def validateMore(self, adding, record, ndx, errs):
        super(COPE, self).validateMore(adding, record, ndx, errs)

        def addError(msg):
            errs.append((ndx + 1, msg))

        if objbase.isBadNum(record["COMMON_OR_OTHER_SQUARE_FOOTAGE"]):
            addError("COMMON_OR_OTHER_SQUARE_FOOTAGE is not a number")
        if objbase.isBadNum(record["NUMBER_OF_RESIDENTIAL_UNITS"]):
            addError("NUMBER_OF_RESIDENTIAL_UNITS is not a number")
        if objbase.isBadNum(record["TOTAL_SQUARE_FOOTAGE"]):
            addError("TOTAL_SQUARE_FOOTAGE is not a number")

        if objbase.isBadNum(record["COMMERCIAL_SQUARE_FOOTAGE"]):
            addError("COMMERCIAL_SQUARE_FOOTAGE is not a number")
        if objbase.isBadNum(record["RESIDENTIAL_SQUARE_FOOTAGE"]):
            addError("RESIDENTIAL_SQUARE_FOOTAGE is not a number")
        if objbase.isBadNum(record["REAL_PROPERTY_VALUE"]):
            addError("REAL_PROPERTY_VALUE is not a number")
        if objbase.isBadNum(record["PERSONAL_PROPERTY"]):
            addError("PERSONAL_PROPERTY is not a number")
        if objbase.isBadNum(record["MISCELLANEOUSPROPERTY"]):
            addError("MISCELLANEOUSPROPERTY is not a number")
        if objbase.isBadNum(record["RENTAL_INCOME"]):
            addError("RENTAL_INCOME is not a number")
        if objbase.isBadNum(record["TIV"]):
            addError("TIV is not a number")
        if objbase.isBadNum(record["NUMBER_OF_BUILDINGS"]):
            addError("NUMBER_OF_BUILDINGS is not a number")
        if objbase.isBadNum(record["NUMBER_OF_STORIES"]):
            addError("NUMBER_OF_STORIES is not a number")
        return