prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Require minium length for "explanation" field in BCD signals
  **Summary**
  _What should be changed?_
  A minimum length of 10 characters should be required for the "explanation" field in BCD signals
  
  **Rationale**
  _What problems would this solve?_
  Less spam submissions
  
  **Audience**
  _Who would use this changed feature?_
  BCD maintainers
  
  **Proposal**
  _What would users see and do? What would happen as a result?_
  Users would be required to enter a meaningful explanation and hopefully refrain from submitting "fehfs", "test", and other garbage.
  
  **Additional context**
  _Is there anything else we should know?_
  Was discussed in https://github.com/mdn/sprints/issues/2289
  
  </issue>
  <code>
  [start of kuma/api/v1/serializers.py]
  1 from rest_framework import exceptions
  2 from rest_framework import serializers
  3 
  4 from kuma.wiki.models import BCSignal, Document
  5 
  6 
  7 class BCSignalSerializer(serializers.Serializer):
  8     feature = serializers.CharField(max_length=255)
  9     browsers = serializers.CharField(max_length=255)
  10     slug = serializers.CharField(max_length=255)
  11     locale = serializers.CharField(max_length=7)
  12     explanation = serializers.CharField(allow_blank=True, max_length=1000)
  13     supporting_material = serializers.CharField(
  14         allow_blank=True, required=False, max_length=1000
  15     )
  16 
  17     def create(self, validated_data):
  18         slug = validated_data.pop("slug")
  19         locale = validated_data.pop("locale")
  20         document = Document.objects.filter(slug=slug, locale=locale).first()
  21 
  22         if document:
  23             return BCSignal.objects.create(document=document, **validated_data)
  24         raise exceptions.ValidationError("Document not found")
  25
  [end of kuma/api/v1/serializers.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/kuma/api/v1/serializers.py b/kuma/api/v1/serializers.py
  --- a/kuma/api/v1/serializers.py
  +++ b/kuma/api/v1/serializers.py
  @@ -9,7 +9,11 @@
       browsers = serializers.CharField(max_length=255)
       slug = serializers.CharField(max_length=255)
       locale = serializers.CharField(max_length=7)
  -    explanation = serializers.CharField(allow_blank=True, max_length=1000)
  +    explanation = serializers.CharField(
  +        # Make sure these match the constants in bcd-signal.jsx
  +        max_length=1000,
  +        min_length=10,
  +    )
       supporting_material = serializers.CharField(
           allow_blank=True, required=False, max_length=1000
       )
  
verification_info: {"golden_diff": "diff --git a/kuma/api/v1/serializers.py b/kuma/api/v1/serializers.py\n--- a/kuma/api/v1/serializers.py\n+++ b/kuma/api/v1/serializers.py\n@@ -9,7 +9,11 @@\n     browsers = serializers.CharField(max_length=255)\n     slug = serializers.CharField(max_length=255)\n     locale = serializers.CharField(max_length=7)\n-    explanation = serializers.CharField(allow_blank=True, max_length=1000)\n+    explanation = serializers.CharField(\n+        # Make sure these match the constants in bcd-signal.jsx\n+        max_length=1000,\n+        min_length=10,\n+    )\n     supporting_material = serializers.CharField(\n         allow_blank=True, required=False, max_length=1000\n     )\n", "issue": "Require minium length for \"explanation\" field in BCD signals\n**Summary**\r\n_What should be changed?_\r\nA minimum length of 10 characters should be required for the \"explanation\" field in BCD signals\r\n\r\n**Rationale**\r\n_What problems would this solve?_\r\nLess spam submissions\r\n\r\n**Audience**\r\n_Who would use this changed feature?_\r\nBCD maintainers\r\n\r\n**Proposal**\r\n_What would users see and do? What would happen as a result?_\r\nUsers would be required to enter a meaningful explanation and hopefully refrain from submitting \"fehfs\", \"test\", and other garbage.\r\n\r\n**Additional context**\r\n_Is there anything else we should know?_\r\nWas discussed in https://github.com/mdn/sprints/issues/2289\n", "before_files": [{"content": "from rest_framework import exceptions\nfrom rest_framework import serializers\n\nfrom kuma.wiki.models import BCSignal, Document\n\n\nclass BCSignalSerializer(serializers.Serializer):\n    feature = serializers.CharField(max_length=255)\n    browsers = serializers.CharField(max_length=255)\n    slug = serializers.CharField(max_length=255)\n    locale = serializers.CharField(max_length=7)\n    explanation = serializers.CharField(allow_blank=True, max_length=1000)\n    supporting_material = serializers.CharField(\n        allow_blank=True, required=False, max_length=1000\n    )\n\n    def create(self, validated_data):\n        slug = validated_data.pop(\"slug\")\n        locale = validated_data.pop(\"locale\")\n        document = Document.objects.filter(slug=slug, locale=locale).first()\n\n        if document:\n            return BCSignal.objects.create(document=document, **validated_data)\n        raise exceptions.ValidationError(\"Document not found\")\n", "path": "kuma/api/v1/serializers.py"}]}