mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 09:13:58 -04:00
Validate CSVs fully
This commit extends the existing function to validate each row’s phone number to also validate that all the required data is present. It does this using the checking that the `Template` class can do when given a template and a `dict` of values.
This commit is contained in:
@@ -22,13 +22,6 @@
|
||||
|
||||
{{file_upload(form.file, button_text='Choose a CSV file')}}
|
||||
|
||||
{{ banner(
|
||||
'You can only send messages to yourself until you <a href="{}">request to go live</a>'.format(
|
||||
url_for('.service_request_to_go_live', service_id=service_id)
|
||||
)|safe,
|
||||
type='important'
|
||||
) }}
|
||||
|
||||
{{ page_footer(
|
||||
"Continue to preview"
|
||||
) }}
|
||||
@@ -36,10 +29,10 @@
|
||||
{% if column_headers %}
|
||||
{% call(item) list_table(
|
||||
example_data,
|
||||
caption='Preview',
|
||||
caption='Example',
|
||||
field_headings=column_headers,
|
||||
field_headings_visible=True,
|
||||
caption_visible=False,
|
||||
caption_visible=True,
|
||||
empty_message="Your data here"
|
||||
) %}
|
||||
{% call field() %}
|
||||
|
||||
Reference in New Issue
Block a user