catamphetamine / react-phone-number-input

React component for international phone number input
http://catamphetamine.gitlab.io/react-phone-number-input/
MIT License
915 stars 193 forks source link

React-phone input error in formik while using handlechange #400

Closed Rahulr2001 closed 2 years ago

Rahulr2001 commented 2 years ago

class Createemp extends Component{

render(){ return(

{ ({ handleSubmit, handleChange, values, errors }) => (
{errors.phone}
)}
)

}

}

export default Createemp;

...value which i enter in the input is always empty..even i entered a mobile...the on change event didnt work for me to give the value to values.phone for my validation

catamphetamine commented 2 years ago

onChange returns a value. handleChange likely expects an event.

On Wed, 16 Feb 2022 at 10:16, Rahulr2001 @.***> wrote:

class Createemp extends Component{

render(){ return(

{

({ handleSubmit, handleChange, values, errors }) => (

{errors.phone}

)}

)

}

}

export default Createemp;

...value which i enter in the input is always empty..even i entered a mobile...the on change event didnt work for me to give the value to values.phone for my validation

— Reply to this email directly, view it on GitHub https://github.com/catamphetamine/react-phone-number-input/issues/400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUP326RGHQWURR5EJ6RE3U3NFOHANCNFSM5OQXW2TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

Rahulr2001 commented 2 years ago

sir..how i change it to event in code.. iam stuck here...i have read all your comment in previous issues but..stuck on the code..that where to change...which code to add.. can u demonstrate me sir

catamphetamine commented 2 years ago

How to change a value to an event? Strictly speaking, there’s no such way. Google for “create change event from value” or something like that. Or use another form library.

On Wed, 16 Feb 2022 at 20:01, Rahulr2001 @.***> wrote:

sir..how i change it to event in code.. iam stuck here...i have read all your comment in previous issues but..stuck on the code..that where to change...which code to add.. can u demonstrate me sir

— Reply to this email directly, view it on GitHub https://github.com/catamphetamine/react-phone-number-input/issues/400#issuecomment-1041881424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUP32Z756Z2A3NNXWQCT3U3PJ6NANCNFSM5OQXW2TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

catamphetamine commented 2 years ago

https://github.com/catamphetamine/react-phone-number-input/issues/298#issuecomment-557779359 Maybe that

On Wed, 16 Feb 2022 at 23:49, Rahulr2001 @.***> wrote:

Closed #400 https://github.com/catamphetamine/react-phone-number-input/issues/400.

— Reply to this email directly, view it on GitHub https://github.com/catamphetamine/react-phone-number-input/issues/400#event-6085753713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUP34CYCW7PBG7TMXVZS3U3QEV3ANCNFSM5OQXW2TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: <catamphetamine/react-phone-number-input/issue/400/issue_event/6085753713@ github.com>