Validation of the data of bank cards
Validation of bank cards on JS, defines the type of card (in this example Visa и MScard), the name of the bank (Private and Shared Bank), is the maximum number which can be entered into the field.Other validation is such as checking the empty field or the correctness of the introduction here is not done, but in practice this must be done.
There was one difficulty with checking the type of card, when you enter the average numbers it all worked and was determined and when to copy and put to the example 414943 it was determined only the name of the bank a type not.The outcome from this situation was very simple, it was necessary to break the introduced number to several examples: 1111 to 1 1 1 1 and check the first number, if 4 - Visa if 5 - MScard
There was one difficulty with checking the type of card, when you enter the average numbers it all worked and was determined and when to copy and put to the example 414943 it was determined only the name of the bank a type not.The outcome from this situation was very simple, it was necessary to break the introduced number to several examples: 1111 to 1 1 1 1 and check the first number, if 4 - Visa if 5 - MScard