WebClub-NITK / Hacktoberfest-2k19

19 stars 115 forks source link

form validation #282

Closed bilalbutt044 closed 4 years ago

bilalbutt044 commented 4 years ago

Resolves Issue #36

Description

made three functions called validateForm validEmail validPhoneNumber

validEmail method is used to check if an email is valid or not. If email is not valid it shows an alert with the message invalid email formate. I used regex for email validation.

validPhoneNumber method is used to check if phone number is valid or not. If a phone number is not valid it shows an alert with the message invalid phone number formate. I used regex for phone number validation.

validateForm in this method I made a valuable called check which value we update with return value from both above function. if formate is not valid we return false and this false saved in check variable which then passed to form.

Technical Specifications

Screenshots (if required)

How to run

copy this path of BilalJsformValidation.html which is located in development/form validation. paste path in browser the file will open.

Checklist

bilalbutt044 commented 4 years ago

when my PR will accept? @Chans321

Chans321 commented 4 years ago

Hey, i finished reviewing your code. Good job. Your pr will be merged soon.

bilalbutt044 commented 4 years ago

Will this pull request count for #hactoberfest competition? On Oct 12, 2019 9:06 AM, "Chans321" notifications@github.com wrote:

Hey, i finished reviewing your code. Good job. Your pr will be merged soon.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WebClub-NITK/Hacktoberfest-2k19/pull/282?email_source=notifications&email_token=AHFN5OH2WBZJU52IQMKJIZDQOFENJA5CNFSM4I7R3MR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBBU7QI#issuecomment-541282241, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFN5OE2VN43M2QPL5YB2HTQOFENJANCNFSM4I7R3MRQ .

niranjanrao1509 commented 4 years ago

@bilalbutt044 Yes!