Update TO number validator to account for dashes and variable character length
This commit is contained in:
@@ -35,6 +35,7 @@ class TaskOrderPdfForm(Form):
|
||||
|
||||
class TaskOrderForm(Form):
|
||||
pdf = FormField(TaskOrderPdfForm, label="task_order_pdf")
|
||||
number = StringField(label="task_order_number", default="number")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -63,6 +64,12 @@ def multi_checkbox_input_macro(env):
|
||||
return getattr(multi_checkbox_template.module, "MultiCheckboxInput")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def text_input_macro(env):
|
||||
text_input_template = env.get_template("components/text_input.html")
|
||||
return getattr(text_input_template.module, "TextInput")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def initial_value_form(scope="function"):
|
||||
return InitialValueForm()
|
||||
@@ -170,3 +177,10 @@ def test_make_pop_date_range(env, app):
|
||||
index=1,
|
||||
)
|
||||
write_template(pop_date_range, "pop_date_range.html")
|
||||
|
||||
|
||||
def test_make_text_input_template(text_input_macro, task_order_form):
|
||||
text_input_to_number = text_input_macro(
|
||||
task_order_form.number, validation="taskOrderNumber"
|
||||
)
|
||||
write_template(text_input_to_number, "text_input_to_number.html")
|
||||
|
Reference in New Issue
Block a user