mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
fix validity check js
This commit is contained in:
parent
dc08aed390
commit
820a36515b
1 changed files with 2 additions and 2 deletions
|
@ -97,11 +97,11 @@ function inlineToast(el, id, style, msg) {
|
||||||
|
|
||||||
function checkDomainAvailability(el) {
|
function checkDomainAvailability(el) {
|
||||||
const callback = (response) => {
|
const callback = (response) => {
|
||||||
toggleInputValidity(el, (response && response.available), msg=response.message);
|
toggleInputValidity(el, (response && response.available), response.message);
|
||||||
announce(el.id, response.message);
|
announce(el.id, response.message);
|
||||||
|
|
||||||
// Determines if we ignore the field if it is just blank
|
// Determines if we ignore the field if it is just blank
|
||||||
ignore_blank = el.classList.contains("blank-ok")
|
let ignore_blank = el.classList.contains("blank-ok")
|
||||||
if (el.validity.valid) {
|
if (el.validity.valid) {
|
||||||
el.classList.add('usa-input--success');
|
el.classList.add('usa-input--success');
|
||||||
// use of `parentElement` due to .gov inputs being wrapped in www/.gov decoration
|
// use of `parentElement` due to .gov inputs being wrapped in www/.gov decoration
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue