Or you may use them as new data-XXX restrictions
<div>
<label for="isbn">ISBN:</label>
<input type="text" data-ISBN="1" class="ui-corner-all" name="isbn" id="isbn"/>
<span>Type: text but use data-ISBN restriction</span>
</div>
Currently this module provides support for 126 types and 126 extensions (18 + 54 * IBAN-XX + 54 * BBAN-XX).
This could lead to a waste of resource consuming. If you just want a few of them, you may list those in one
array and pass it as an argument when invoke the static 'use' method
<script type="text/javascript" charset="UTF-8">
$(document).ready(function(){
$.ht5ifv('use',['ISBN','VAT']); //only use VAT and ISBN types/restrictions
$('form').ht5ifv();
});
</script>
The above code only installs code for handling two new types (ISBN and VAT) and two new extensions
(data-ISBN and data-VAT).
You could also limit it to be only installed as a type or as a restriction.
At same time you may also change the (type/restriction) name
<script type="text/javascript" charset="UTF-8">
$(document).ready(function(){
$.ht5ifv('use',[
['_ISBN','type','tISBN'], //install type ISBN under the name tISBN
['_VAT','restriction','tVAT'] //install restriction VAT under the name rVAT
]);
$('form').ht5ifv();
});
</script>
What more
This is not a closed list (and never will be).
See the source code if you need to change some validatons rules or add/delete some of them.
The sources of information is indicated in the source code, case by case.
How validation is made
- iTelNumber: A RE pattern
- US-PN: A RE pattern
- PT-PN: A RE pattern
- creditCard: A RE pattern and a Checksum
- ISBN: A RE pattern and a Checksum
- VAT: A RE pattern
- US-PC: A RE pattern
- CA-PC: A RE pattern
- PT-PC: A RE pattern
- DE-PC: A RE pattern
- UK-PC: A RE pattern
- US-SSN: A RE pattern
- IP: A RE pattern
- PT-BI: A RE pattern and a Checksum
- PT-NIF: A RE pattern and a Checksum
- PT-NIB: A RE pattern and a Checksum
- IBAN: A RE pattern and a Checksum
- BBAN: A RE pattern and a Checksum
- IBAN-XX: A RE pattern and a Checksum
- BBAN-XX: A RE pattern and a Checksum