mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-26 04:28:39 +02:00
error messaging for key tags
This commit is contained in:
parent
54da643132
commit
4995d28f1c
2 changed files with 7 additions and 6 deletions
|
@ -125,6 +125,7 @@
|
|||
|
||||
<div class="usa-table-container--scrollable usa-table-container--override-overflow usa-table-container--override-scrollable padding-top-5 margin-top-0" tabindex="0">
|
||||
<table class="usa-table usa-table--borderless usa-table--stacked dotgov-table dotgov-table--stacked dotgov-table--cell-padding-1-1-2px-0" id="dsdata-table">
|
||||
<caption class="sr-only">Your DS data records</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" role="columnheader" class="text-bottom">Key tag</th>
|
||||
|
@ -216,24 +217,24 @@
|
|||
</tr>
|
||||
<!-- Edit row -->
|
||||
<tr class="edit-row display-none">
|
||||
<td class="text-bottom" data-label="Key tag">
|
||||
{% with sublabel_text="Numbers (0-9) only." %}
|
||||
<td class="text-bottom">
|
||||
{% with sublabel_text="(1-65534)." %}
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error margin-top-0" use_small_sublabel_text=True inline_error_class="font-body-xs" %}
|
||||
{% input_with_errors form.key_tag %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
<td class="text-bottom" data-label="Algorithm">
|
||||
<td class="text-bottom">
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error margin-top-0" use_small_sublabel_text=True inline_error_class="font-body-xs" %}
|
||||
{% input_with_errors form.algorithm %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
<td class="text-bottom" data-label="Digest type">
|
||||
<td class="text-bottom">
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error margin-top-0" use_small_sublabel_text=True inline_error_class="font-body-xs" %}
|
||||
{% input_with_errors form.digest_type %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
<td class="text-bottom" data-label="Digest">
|
||||
<td class="text-bottom">
|
||||
{% with sublabel_text="Numbers (0-9) and letters (a-f) only. SHA-1: 40 chars, SHA-256: 64 chars." %}
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error margin-top-0" use_small_sublabel_text=True inline_error_class="font-body-xs" %}
|
||||
{% input_with_errors form.digest %}
|
||||
|
|
|
@ -262,7 +262,7 @@ class DsDataError(Exception):
|
|||
DsDataErrorCodes.INVALID_DIGEST_SHA1: ("SHA-1 digest must be exactly 40 characters."),
|
||||
DsDataErrorCodes.INVALID_DIGEST_SHA256: ("SHA-256 digest must be exactly 64 characters."),
|
||||
DsDataErrorCodes.INVALID_DIGEST_CHARS: ("Digest must contain only alphanumeric characters (0-9, a-f)."),
|
||||
DsDataErrorCodes.INVALID_KEYTAG_SIZE: ("Key tag must be greater than 0 and less than 65535."),
|
||||
DsDataErrorCodes.INVALID_KEYTAG_SIZE: ("Enter a number between 1 and 65534."),
|
||||
DsDataErrorCodes.INVALID_KEYTAG_CHARS: ("Key tag must be numeric (0-9)."),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue