"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[495],{1082:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var i=o(4321),n=(o(2983),o(4993));const a={},r="Migrating from v2 to v3",s={unversionedId:"Migrations/migrate-to-v3",id:"Migrations/migrate-to-v3",title:"Migrating from v2 to v3",description:"Version 2 becomes deprecated and unsupported since v3 is released.",source:"@site/docs/05-Migrations/02-migrate-to-v3.md",sourceDirName:"05-Migrations",slug:"/Migrations/migrate-to-v3",permalink:"/docs/Migrations/migrate-to-v3",draft:!1,editUrl:"https://github.com/goveo/react-international-phone/tree/master/packages/docs/docs/05-Migrations/02-migrate-to-v3.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Migrating from v3 to v4",permalink:"/docs/Migrations/migrate-to-v4"},next:{title:"Migrating from v2.1 to v2.2",permalink:"/docs/Migrations/migrate-to-v2.2"}},d={},l=[{value:"Validation has been removed in v3.",id:"validation-has-been-removed-in-v3",level:2},{value:"Regions and subregions have been removed",id:"regions-and-subregions-have-been-removed",level:2}],m={toc:l};function p(e){let{components:t,...o}=e;return(0,n.kt)("wrapper",(0,i.Z)({},m,o,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"migrating-from-v2-to-v3"},"Migrating from v2 to v3"),(0,n.kt)("admonition",{title:"Why is it important to update?",type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"Version 2 becomes deprecated and unsupported since v3 is released. ",(0,n.kt)("br",null),"\nNew features and bug fixes will be pushed only to v3.")),(0,n.kt)("h2",{id:"validation-has-been-removed-in-v3"},"Validation has been removed in v3."),(0,n.kt)("p",null,"If you used the ",(0,n.kt)("inlineCode",{parentName:"p"},"usePhoneValidation")," hook or the ",(0,n.kt)("inlineCode",{parentName:"p"},"validatePhone")," function, you need to implement it on your own."),(0,n.kt)("p",null,"We recommend to use a ",(0,n.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/google-libphonenumber"},(0,n.kt)("inlineCode",{parentName:"a"},"google-libphonenumber"))," library for number validation.",(0,n.kt)("br",null),"\nCheck the ",(0,n.kt)("a",{parentName:"p",href:"/docs/Usage/PhoneValidation"},"Phone Validation page")," to get basic example of phone validation."),(0,n.kt)("h2",{id:"regions-and-subregions-have-been-removed"},"Regions and subregions have been removed"),(0,n.kt)("p",null,"If you used it (and really need it), please open an ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/goveo/react-international-phone/issues"},"issue")," or ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/goveo/react-international-phone/discussions"},"discussion")," and we will provide a basic solution on how to re-implement it."))}p.isMDXComponent=!0}}]);