Я использую форму HTML с шаблонами проверки из этой статьи, но я не уверен, как сохранить тот же (стиль) валидационный шаблон для номера телефона из 10 символов, начиная с 0? "0 ([0-9]) {9}"
нужен ли мне другое начало "^(([-\ w \ d]+)" & end ") $" от других входов, чтобы сохранить шаблоны для всех входов или просто переоценки? class = "Snippet">
Я использую форму HTML с шаблонами проверки из этой статьи, но я не уверен, как сохранить тот же (стиль) валидационный шаблон для номера телефона из 10 символов, начиная с 0? "0 ([0-9]) {9}"
нужен ли мне другое начало "^(([-\ w \ d]+)" & end ") $" от других входов, чтобы сохранить шаблоны для всех входов или просто переоценки? class = "Snippet">
[code]//sitepoint.com/instant-validation //add event construct for modern browsers or IE //which fires the callback with a pre-converted target reference function addEvent(node, type, callback) { if (node.addEventListener) { node.addEventListener( type, function(e) { callback(e, e.target); }, false ); } else if (node.attachEvent) { node.attachEvent("on" + type, function(e) { callback(e, e.srcElement); }); } }
//identify whether a field should be validated //ie. true if the field is neither readonly nor disabled, //and has either "pattern", "required" or "aria-invalid" function shouldBeValidated(field) { return ( !(field.getAttribute("readonly") || field.readonly) && !(field.getAttribute("disabled") || field.disabled) && (field.getAttribute("pattern") || field.getAttribute("required")) ); }
//field testing and validation function function instantValidation(field) { //if the field should be validated if (shouldBeValidated(field)) { //the field is invalid if: //it's required but the value is empty //it has a pattern but the (non-empty) value doesn't pass var invalid = (field.getAttribute("required") && !field.value) || (field.getAttribute("pattern") && field.value && !new RegExp(field.getAttribute("pattern")).test(field.value));
//add or remove the attribute is indicated by //the invalid flag and the current attribute state if (!invalid && field.getAttribute("aria-invalid")) { field.removeAttribute("aria-invalid"); } else if (invalid && !field.getAttribute("aria-invalid")) { field.setAttribute("aria-invalid", "true"); } } }
//now bind a delegated change event //== THIS FAILS IN INTERNET EXPLORER import url('https://fonts.googleapis.com/css?family=Cormorant+Garamond:300,700|Titillium+Web:200,400,400i,700&display=swap');
Я хочу отправить мне код подтверждения для моего номера телефона или любого номера телефона с Firebase, и мне нужно добавить его в средство выбора страны, когда я устанавливаю последнюю версию, покажите мне ошибку
страница проверки
import...
Я провожу две регрессии, которые, как я думал, дадут одинаковые результаты, и мне интересно, может ли кто-нибудь объяснить, почему они разные. Один — со статистическими моделями OLS, а другой — с линейными моделями PanelOLS.
Минимальный рабочий...