{"id":2912,"date":"2020-06-23T16:56:13","date_gmt":"2020-06-23T15:56:13","guid":{"rendered":"https:\/\/ibex.tech\/javascript\/?p=2912"},"modified":"2022-02-17T07:14:46","modified_gmt":"2022-02-17T07:14:46","slug":"validate-text-as-you-type","status":"publish","type":"post","link":"https:\/\/ibex.tech\/javascript\/text\/validate-text-as-you-type","title":{"rendered":"Validate text as you type"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Good examples<\/h4>\n\n\n\n<p><a href=\"https:\/\/www.w3schools.com\/howto\/howto_js_password_validation.asp\">https:\/\/www.w3schools.com\/howto\/howto_js_password_validation.asp<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Remove non permitted characters from an input box as user types<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;script>\n    function VerifyProfileText() {\n      var a = document.getElementById(\"Nickname\").value;\n      a = a.replace(\/&#91;^a-zA-Z ]\/g, '');   \/\/Permit a to z, AtoZ and space only\n      document.getElementById(\"Nickname\").value = a;\n    }\n  &lt;\/script>\n\n&lt;input type=\"text\" id=\"MyNickname\" name=\"Nickname\" maxlength=\"20\" value=\"$Nickname\" onkeyup=\"VerifyProfileText();\" paste=\"VerifyProfileText();\" ><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Good examples https:\/\/www.w3schools.com\/howto\/howto_js_password_validation.asp Remove non permitted characters from an input box as user types<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62,255],"tags":[],"class_list":["post-2912","post","type-post","status-publish","format-standard","hentry","category-text","category-validate"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/2912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/comments?post=2912"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/2912\/revisions"}],"predecessor-version":[{"id":2922,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/posts\/2912\/revisions\/2922"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/media?parent=2912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/categories?post=2912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/javascript\/wp-json\/wp\/v2\/tags?post=2912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}