-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nationalId):added (Validating Iranians national id) feature
* test(nationalId):added verify input and nationalId * feat(nationalId):added verifyIranianNationalId getter * improvement(nationalId):added nation id example and update README.md * improvement(readme):update README.md * improvement(readme):update README.md Co-authored-by: Ehsan Aramide <[email protected]>
- Loading branch information
1 parent
3eefb29
commit 19efe02
Showing
16 changed files
with
393 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:dart_persian_tools/dart_persian_tools.dart'; | ||
|
||
void main() { | ||
var nationalID = '0684159414'; | ||
print(verifyIranianNationalId(nationalID)); // true | ||
|
||
///the nationalID should contain 10 digit, so the following verifications | ||
///should return false | ||
nationalID = '00000'; | ||
print(verifyIranianNationalId(nationalID)); // false | ||
|
||
nationalID = ''; | ||
print(nationalID.isIranianNationalId); // false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import 'package:dart_persian_tools/dart_persian_tools.dart'; | ||
|
||
void main(){ | ||
void main() { | ||
print(validateCardNumber('6219861034529007')); // true | ||
print(validateCardNumber('6219861034529007')); // true | ||
print(validateCardNumber('0000000000000000')); // false | ||
print(validateCardNumber('621986103452900')); // false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.