瀏覽代碼

add more validator

weichen 3 年之前
父節點
當前提交
b393af059c
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      models/utils/validators.py

+ 10 - 0
models/utils/validators.py

@@ -6,6 +6,10 @@ def is_valid_section3_section(text):
     return 'class="section3"' in text
 
 
+def is_valid_section3_text_center_section(text):
+    return 'class="section3 text-center"' in text
+
+
 def is_valid_section13_overly_section(text):
     return 'class="section13 overly"' in text
 
@@ -14,6 +18,10 @@ def is_valid_section14_section(text):
     return 'class="section14"' in text
 
 
+def is_valid_section14_d_flex_section(text):
+    return 'class="section14 d-flex align-items-center"' in text
+
+
 def is_valid_section13_section(text):
     return 'class="section13"' in text
 
@@ -63,9 +71,11 @@ def unvalid_section(text):
 
 
 IS_VALID_SECTION = {'section3': is_valid_section3_section,
+                    'section3_text-center': is_valid_section3_text_center_section,
                     'section13_overly': is_valid_section13_overly_section,
                     'section13': is_valid_section13_section,
                     'section14': is_valid_section14_section,
+                    'section14_d-flex_align-items-center': is_valid_section14_d_flex_section,
                     'section16': is_valid_section16_section,
                     'section17': is_valid_section17_section,
                     'section18': is_valid_section18_section,