{"id":5622,"date":"2024-01-11T16:40:00","date_gmt":"2024-01-11T16:40:00","guid":{"rendered":"https:\/\/codehim.com\/?p=5622"},"modified":"2024-01-22T14:45:20","modified_gmt":"2024-01-22T09:45:20","slug":"form-validation-in-javascript-code","status":"publish","type":"post","link":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/","title":{"rendered":"Form Validation in JavaScript Code"},"content":{"rendered":"<p>This JavaScript code snippet helps you to create a form validation feature on the form submit. It validates username, email, and password and displays the inline error message in case of invalid input. You can integrate this vanilla JavaScript code for registration\/signup forms to validate inputs on submit.<\/p>\n<p>This form validation snippet doesn&#8217;t require any additional library or plugin. It uses <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Guide\/Regular_Expressions\" target=\"_blank\" rel=\"noopener\">JavaScript regular expressions<\/a> to validate emails. It allows setting min\/max length rules for <a href=\"https:\/\/codehim.com\/text-input\/jquery-form-validation-on-submit-validator\/\" target=\"_blank\" rel=\"noopener\">input validation<\/a>.\u00a0 Moreover, it can be integrated with your existing HTML forms.<\/p>\n<h2>How to Create Form Validation in JavaScript<\/h2>\n<p>1. First you need to create the HTML form element with username, email, and password input with validation attributes.<\/p>\n<pre class=\"prettyprint linenums lang-html\"> &lt;div class=\"container\"&gt;\r\n    &lt;form id=\"form\" class=\"form\"&gt;\r\n        &lt;h2&gt;Register With Us&lt;\/h2&gt;\r\n        &lt;div class=\"form-control\"&gt;\r\n            &lt;label for=\"username\"&gt;Username&lt;\/label&gt;\r\n            &lt;input type=\"text\" id=\"username\" placeholder=\"Enter Username\"&gt;\r\n            &lt;small&gt;Error Message&lt;\/small&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"form-control\"&gt;\r\n            &lt;label for=\"email\"&gt;Email&lt;\/label&gt;\r\n            &lt;input type=\"text\" id=\"email\" placeholder=\"Enter email\"&gt;\r\n            &lt;small&gt;Error Message&lt;\/small&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"form-control\"&gt;\r\n            &lt;label for=\"password\"&gt;Password&lt;\/label&gt;\r\n            &lt;input type=\"password\" id=\"password\" placeholder=\"Enter password\"&gt;\r\n            &lt;small&gt;Error Message&lt;\/small&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"form-control\"&gt;\r\n            &lt;label for=\"password2\"&gt;Confirm Password&lt;\/label&gt;\r\n            &lt;input type=\"password\" id=\"password2\" placeholder=\"Enter password again\"&gt;\r\n            &lt;small&gt;Error Message&lt;\/small&gt;\r\n        &lt;\/div&gt;\r\n        &lt;button&gt;Submit&lt;\/button&gt;\r\n    &lt;\/form&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>2. After that, define the CSS styles for HTML form inputs, success, and error messages as follows.<\/p>\n<pre class=\"prettyprint linenums lang-css\">:root{\r\n    --succes-color: #2ecc71;;\r\n    --error-color: #e74c3c;\r\n}\r\n.container{\r\n    background-color: #fff;\r\n    border-radius: 5px;\r\n    box-shadow: 0 2px 10px rgba(0,0,0,0.3);\r\n    width: 400px;\r\n    margin: 10px auto;\r\n}\r\nh2{\r\n    text-align: center;\r\n    margin: 0 0 20px;\r\n}\r\n.form{\r\n    padding: 30px 40px;\r\n}\r\n.form-control{\r\n    margin-bottom: 10px;\r\n    padding-bottom: 20px;\r\n    position: relative;\r\n}\r\n.form-control label{\r\n    color:#777;\r\n    display: block;\r\n    margin-bottom: 5px; \r\n}\r\n.form-control input{\r\n    border: 2px solid #f0f0f0;\r\n    border-radius: 4px;\r\n    display: block;\r\n    width: 100%;\r\n    padding: 10px;\r\n    font-size: 14px;   \r\n}\r\n.form-control input:focus{\r\n    outline: 0;\r\n    border-color: #777;\r\n\r\n}\r\n.form-control.success input {\r\n    border-color: var(--succes-color);\r\n}\r\n.form-control.error input {\r\n    border-color: var(--error-color);    \r\n}\r\n.form-control small{\r\n    color: var(--error-color);\r\n    position: absolute;\r\n    bottom: 0;\r\n    left: 0;\r\n    visibility: hidden;\r\n}\r\n.form-control.error small{\r\n    visibility: visible;\r\n}\r\n.form button {\r\n    cursor: pointer;\r\n    background-color: #3498db;\r\n    border: 2px solid #3498db;\r\n    border-radius: 4px;\r\n    color: #fff;\r\n    display: block;\r\n    padding: 10px;\r\n    font-size: 16px;\r\n    margin-top:20px;\r\n    width:100%;\r\n}\r\n<\/pre>\n<p>3. Finally, include the form validation JavaScript code in your project and done.<\/p>\n<pre class=\"prettyprint linenums lang-js\">const form = document.getElementById('form');\r\nconst username = document.getElementById('username');\r\nconst email = document.getElementById('email');\r\nconst password = document.getElementById('password');\r\nconst password2 = document.getElementById('password2');\r\n\r\n\/\/Show input error messages\r\nfunction showError(input, message) {\r\n    const formControl = input.parentElement;\r\n    formControl.className = 'form-control error';\r\n    const small = formControl.querySelector('small');\r\n    small.innerText = message;\r\n}\r\n\r\n\/\/show success colour\r\nfunction showSucces(input) {\r\n    const formControl = input.parentElement;\r\n    formControl.className = 'form-control success';\r\n}\r\n\r\n\/\/check email is valid\r\nfunction checkEmail(input) {\r\n    const re = \/^(([^&lt;&gt;()\\[\\]\\\\.,;:\\s@\"]+(\\.[^&lt;&gt;()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$\/;\r\n    if(re.test(input.value.trim())) {\r\n        showSucces(input)\r\n    }else {\r\n        showError(input,'Email is not invalid');\r\n    }\r\n}\r\n\r\n\/\/checkRequired fields\r\nfunction checkRequired(inputArr) {\r\n    inputArr.forEach(function(input){\r\n        if(input.value.trim() === ''){\r\n            showError(input,`${getFieldName(input)} is required`)\r\n        }else {\r\n            showSucces(input);\r\n        }\r\n    });\r\n}\r\n\r\n\/\/check input Length\r\nfunction checkLength(input, min ,max) {\r\n    if(input.value.length &lt; min) {\r\n        showError(input, `${getFieldName(input)} must be at least ${min} characters`);\r\n    }else if(input.value.length &gt; max) {\r\n        showError(input, `${getFieldName(input)} must be les than ${max} characters`);\r\n    }else {\r\n        showSucces(input);\r\n    }\r\n}\r\n\r\n\/\/get FieldName\r\nfunction getFieldName(input) {\r\n    return input.id.charAt(0).toUpperCase() + input.id.slice(1);\r\n}\r\n\r\n\/\/ check passwords match\r\nfunction checkPasswordMatch(input1, input2) {\r\n    if(input1.value !== input2.value) {\r\n        showError(input2, 'Passwords do not match');\r\n    }\r\n}\r\n\r\n\/\/Event Listeners\r\nform.addEventListener('submit',function(e) {\r\n    e.preventDefault();\r\n\r\n    checkRequired([username, email, password, password2]);\r\n    checkLength(username,3,15);\r\n    checkLength(password,6,25);\r\n    checkEmail(email);\r\n    checkPasswordMatch(password, password2);\r\n}); \r\n<\/pre>\n<p>That&#8217;s all! hopefully, this JavaScript validation plugin is helpful for you. If you have any questions or suggestions, let me know by comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript code snippet helps you to create a form validation feature on the form submit. It validates username, email,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":5625,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[97,116],"tags":[98],"class_list":["post-5622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-text-input","category-vanilla-javascript","tag-password-validation"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Form Validation in JavaScript Code &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a form validation function in JavaScript with source code. You can validate username, email, password &amp; show error on form submit.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Form Validation in JavaScript Code &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a form validation function in JavaScript with source code. You can validate username, email, password &amp; show error on form submit.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-11T16:40:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T09:45:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"Form Validation in JavaScript Code\",\"datePublished\":\"2024-01-11T16:40:00+00:00\",\"dateModified\":\"2024-01-22T09:45:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/\"},\"wordCount\":172,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png\",\"keywords\":[\"Password Validation\"],\"articleSection\":[\"Text &amp; Input\",\"Vanilla JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/\",\"url\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/\",\"name\":\"Form Validation in JavaScript Code &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png\",\"datePublished\":\"2024-01-11T16:40:00+00:00\",\"dateModified\":\"2024-01-22T09:45:20+00:00\",\"description\":\"Here is a form validation function in JavaScript with source code. You can validate username, email, password & show error on form submit.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png\",\"width\":1280,\"height\":960,\"caption\":\"Form Validation in JavaScript Code\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text &amp; Input\",\"item\":\"https:\/\/codehim.com\/category\/text-input\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Form Validation in JavaScript Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Form Validation in JavaScript Code &#8212; CodeHim","description":"Here is a form validation function in JavaScript with source code. You can validate username, email, password & show error on form submit.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/","og_locale":"en_US","og_type":"article","og_title":"Form Validation in JavaScript Code &#8212; CodeHim","og_description":"Here is a form validation function in JavaScript with source code. You can validate username, email, password & show error on form submit.","og_url":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-11T16:40:00+00:00","article_modified_time":"2024-01-22T09:45:20+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"Form Validation in JavaScript Code","datePublished":"2024-01-11T16:40:00+00:00","dateModified":"2024-01-22T09:45:20+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/"},"wordCount":172,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png","keywords":["Password Validation"],"articleSection":["Text &amp; Input","Vanilla JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/","url":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/","name":"Form Validation in JavaScript Code &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png","datePublished":"2024-01-11T16:40:00+00:00","dateModified":"2024-01-22T09:45:20+00:00","description":"Here is a form validation function in JavaScript with source code. You can validate username, email, password & show error on form submit.","breadcrumb":{"@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2021\/09\/form-validation-in-javascript-code.png","width":1280,"height":960,"caption":"Form Validation in JavaScript Code"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/text-input\/form-validation-in-javascript-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Text &amp; Input","item":"https:\/\/codehim.com\/category\/text-input\/"},{"@type":"ListItem","position":3,"name":"Form Validation in JavaScript Code"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":11462,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/5622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=5622"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/5622\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/5625"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=5622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=5622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=5622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}