invoices_record.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:sii 作者: gisce 项目源码 文件源码
def validate_field_max_length(self, value, field_name, max_chars):
        """
        Validates maximum length for the field
        :param value: field value
        :type value: str
        :param field_name: name of the field
        :type field_name: str
        :param max_chars: maximum number of chars for the field
        :type max_chars: int
        :return:
        :raise ValidationError: if len(value) is greater than max_chars
        """
        if len(value) > max_chars:
            raise ValidationError(
                self.get_max_length_error_message(
                    field_name=field_name, max_chars=max_chars
                )
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号