/    Sign up×
Community /Pin to ProfileBookmark

Authentication of the numbers if they are from 7 to 10 digits redirect to page.

We have a webpage which needs a verification for a product.
There are 2 fields (inputs) where the user writes a numbers.
The first field is caled “Serial Number” and the second one “Validation Code”.
When the user fullfills the first field (Serial Number), if the number is between 7 and 10 digits then the user can write in the second field.
If the first field number (Serial Number) is not properly filled appears error message – “Wrong serial number”
When the user enters the second field (Validation Code) and if the entered number is between 7 and 10 digits the entered data is checked from data base.
There is data base for valid numvbers of the both fields – “Serial Number” and “Validation Code”.
If the entered data is properly set opens a new page “authentication_success.html”.
If there is a mistake appears text over the form – “Please enter number between 7 and 10 digits”.
If one of the numbers don’t exist in data base redirect to page authentication_error.html
The function should be writen on Javascript orJquery and it should work on the page: https://alleygh.co/authenticate-your-product/

This is everything, if you have questions please don’t hesitate and let me know.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @anre spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...