[code]I did my own research and find out that following guidelines and assumptions are followed while validating Passport Numbers. The Passport Number is of the following format :
A12345674
The format will be same for all the Passport numbers. i.e. the first character is an upper case letter of the English alphabet, followed by 2 numbers, then an optional space followed by 6 numbers.
We bring additional assumptions:
- The first digit or the last digit will never be 0
- The first character cannot be Q, X or Z.
My code for HTML
IDENTIFICATION
ID Number
<input type="radio" name="checkboxSelector" class="checkPassport" ><label>Passport Number</label><br>
<div class="warn"><br><span id="statusPassport"></span></div>
<input type="hidden" id="passport" class="checkPassport value=" Value="" />
<input type="text" id="passport" class="textPassport" size="9" name="passport" style="display:none" placeholder="Please enter valid passport number" onkeyup="passport_validate(this.value);"></br>
<p> <br>
[/code]
My JavaScript code
[code] [/code]
Any help will be appreciated.