Package Exports
- bloodtype-validator
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bloodtype-validator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
BLOODTYPE-VALIDATOR
Confirms Value is a Valid Bloodtype
Installation
npm install bloodtype-validator
Simple Validation
require('bloodtype-validator')( 'a' ) // returns true
require('bloodtype-validator')( 'a', function( error, is_valid ){
// is_valid === true
});Strict Validation
In addition to being a valid bloodtype, genotype indicator (+/-) must be included.
require('bloodtype-validator')( 'a', 'strict' ) // returns false
require('bloodtype-validator')( 'a+', 'strict' ) // returns true
require('bloodtype-validator')( 'a', 'strict', function( error, is_valid ){
// is_valid === false
});
require('bloodtype-validator')( 'a+', 'strict', function( error, is_valid ){
// is_valid === true
});