Chinese identity card
Description
The Chinese Identity Card module is a small module and just provide a field type only for chinese identity card.
But it's useful for entering ID Card in china. No need to install field validation module or using drupal
form alter api to add validation handler. This module using text form element,
And adding module defined widget and validation.
Now this module only accepts valid ID Numbers in china (For example: 511702197701193532 or 320311770706001).
Link to sandbox page
https://www.drupal.org/sandbox/ivanzhu/2513696
Setting up repository for the first time
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/ivanzhu/2513696.git chinese_identity_card
cd chinese_identity_card
Pareview review link
http://pareview.sh/pareview/httpgitdrupalorgsandboxivanzhu2513696git
Some data for testing
140925198206176495
652324197909253715
230307199306056993
652828197504263336
542329198601085912
33080219771222207X
320311770706001
320311770706002
Reviews of other projects
https://www.drupal.org/node/2545164#comment-10211051
https://www.drupal.org/node/2548277#comment-10203795
https://www.drupal.org/node/2548277#comment-10206337
https://www.drupal.org/node/2576111#comment-10434941
https://www.drupal.org/node/2574025#comment-10516618
https://www.drupal.org/node/2587323#comment-10517604
https://www.drupal.org/node/2605018#comment-10535762
Comments
Comment #1
perignon commentedThis is a quick review. First code documentation should be in English for the Doc blocks. Also refer to Drupal coding standards.
You have numerous coding issues that need to be addressed:
http://pareview.sh/pareview/httpgitdrupalorgsandboxivanzhu2513696git
Comment #2
ivanzhu commentedHi,
The test for codes has been passed.
Please review it again.
Thanks,
Comment #3
ajalan065 commentedHi ivanzhu,
1. Your README file is not as per the Drupal Guidelines. Please refer to guidelines for in-project documentation and/or the README Template.
2. Please rename your *.test file to *.inc and make the changes wherever the name for this file is concerned.
3. Instead of using array_key_exists(), please use isset() in your *.module.
4. As far as I could get from your code, you are attempting to create a textfield, which is working fine. Does it accepts the date of birth or something else? I have tried all possible inputs including the DOB, numbers or characters. But irrespective of the input, it gives the error message "the input may not be valid". So is it a misunderstanding on my part regarding the inputs or something to be done from your side. Your README also explains nothing about the things.
Change the status to "Needs Review" when all things are sorted.
And take part in Review Bonus Program to have a higher priority.
Comment #4
ivanzhu commentedHi
Thank you for your reviewing.
For the last question: because this module only accepts a valid ID Number in china. like: 511702197701193532 .
Comment #5
babusaheb.vikas commented1) It would be better if your *.info file looks like:
2) You should provide the hook_help to allow site builders to find information about your module using Drupal UI.
3) I have found below error when I entered 15 digit(511702197701193) ID Numbers for 'Chinese Identity card' field and save that new node.
Exception: DateTime::__construct(): Failed to parse time string (1919-77-01) at position 6 (7): Unexpected character in DateTime->__construct() (line 277 of D:\xampp\htdocs\demosite\sites\all\modules\chinese_identity_card\chinese_identity_card.module).Comment #6
ivanzhu commentedThank you for your review.
Now problems are fixed.
Comment #7
xavip commentedAutomatic Review
Pareview says: error in chinese_identity_card.module line 26.
It would be nice to put the link to your pareview review on the issue summary.
Manual Review
This review uses the Project Application Review Template.
Comment #8
ivanzhu commented@XaviP , Thank you for reviewing.
All problems updated.
Comment #9
ivanzhu commentedComment #10
tr commented@ajalan065: In #3 you said:
That is wrong. The .test extension is the proper file extension to use for SimpleTest test cases. You can read this in the Drupal SimpleTest coding standards.
Comment #11
ivanzhu commented@ TR, Yes, I agree with you. It's should be .test for SimpleTest test cases.
Comment #12
ivanzhu commentedComment #13
ivanzhu commentedComment #14
ivanzhu commentedComment #15
ivanzhu commentedComment #16
ivanzhu commentedComment #17
klausiPlease don't RTBC your own issues, only another reviewer should do that.
manual review:
Otherwise looks good to me, so I think this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to Naveen as he might have time to take a final look at this.
Comment #18
jimmyko commentedIs this module re-inventing wheels?
Comment #19
klausi@jimmyko: you mean there is already a similar module? Could you provide a link?
Comment #20
ivanzhu commented@jimmyko @klausi
I don't think so. before I want to push this module to drupal.org. I had found a similar module with some key words(identity, id card. ). No result showed me.
Comment #21
ivanzhu commentedComment #22
ivanzhu commentedComment #23
ivanzhu commented@klausi
Problems had fixed.
Comment #24
klausiNo objections for a week, so ...
Thanks for your contribution, ivanzhu!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.