This module validates 'vocabulary name' by set of rules, like restricting numbers, some allowed special characters like (- . _) , block special words and minimum/maximum characters.

Project Link
https://www.drupal.org/sandbox/hiramanpatil/2745387

Projects Git URL
git clone --branch 7.x-1.x https://git.drupal.org/sandbox/hiramanpatil/2745387.git vocabulary_validation

Manual reviews of other projects

[D7] https://www.drupal.org/node/2748429#comment-11292467
[D8] https://www.drupal.org/node/2748169#comment-11292513
[D7] https://www.drupal.org/node/2668938#comment-11295083

Manual reviews of other projects (2)
[D7] https://www.drupal.org/node/2757621#comment-11349985
[D7] https://www.drupal.org/node/2771787#comment-11444403
[D7] https://www.drupal.org/node/2775811#comment-11459161

Automatic Review
[D8] https://www.drupal.org/node/2758935#comment-11358421

Comments

hiramanpatil created an issue. See original summary.

manojapare’s picture

@hiramanpatil: Please change git clone url, this url is for maintainers. Then only community members can clone and review the module.

hiramanpatil’s picture

Issue summary: View changes
hiramanpatil’s picture

@manojapare,

I have updated git clone URL.

Thanks

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

hiramanpatil’s picture

Issue summary: View changes
yogeshmpawar’s picture

Hi hiramanpatil,
I have reviewed your module please see below issues in automatic & manual reviews need to be fix.

Automatic Review

http://pareview.sh/pareview/httpsgitdrupalorgsandboxhiramanpatil2745387git
Please go through this review, there is one coding standard indenting issue.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
(*) 1. Validation errors mismatch issue for min & max values. vocabulary_validation.admin.inc line no. 58 you are checking
only max number but in error message you mentioned both the values min & max. also you mentioned on line no.68 that "These value should be more than 1" for min value so i think you don't want to allow "0" value for max value also on line no.58
2. The error message on vocabulary_validation.admin.inc line no. 68 should be "These value should be more than 0" because "1" is allowed in min value as per condition of error message.
3. In vocabulary_validation.admin.inc form_set_error function you should pass "vocabulary_validation_rule][max_char" & "vocabulary_validation_rule][min_char" instead of "max_char" & "min_char" so it will highlight the field when error occurred.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

hiramanpatil’s picture

Hi @Yogesh,

Thanks for the reviewing this module. As per your review, I have updated the validation and error messages in vocabulary_validation.admin.inc file.

Also debugging 'coding standard indenting' issue with README file. Once resolve will commit the code.

Thanks

nixou’s picture

Hi hiramanpatil,

I did a manual review of your module and all seems to be working well.

However I found 2 more problems :

  • Don't use hook_form_alter, use hook_form_FORM_ID_alter instead : "vocabulary_validation_form_taxonomy_form_vocabulary_alter" (performance).
  • If I add a vocabulary before to submit your settings form, I got notices :

Notice: Undefined index: min_char in vocabulary_validation_vocabulary_validate() (line 69 of /var/www/html/sites/all/modules/custom/vocabulary_validation/vocabulary_validation.module).
Notice: Undefined index: max_char in vocabulary_validation_vocabulary_validate() (line 70 of /var/www/html/sites/all/modules/custom/vocabulary_validation/vocabulary_validation.module).

And the error message is buggy :

Vocabulary should have maximum of characters

nixou’s picture

Status: Needs review » Needs work
hiramanpatil’s picture

Status: Needs work » Needs review

@Nixou,

Thanks for the review.

I have made below changes in code.

1) Used hook_form_FORM_ID_alter instead hook_form_alter

2) Added code to check whether settings form is submitted or not before validate vocabulary name.

Thanks

ajaynimbolkar’s picture

Hi hiramanpatil,
I have reviewed your module please see below issues in automatic & manual reviews need to be fix.

Manual Review

Individual user account

[Yes: Follows] the guidelines for individual user accounts.

No duplication

[Yes: Does not cause] module duplication and/or fragmentation.

Master Branch

[Yes: Follows] the guidelines for master branch.

Licensing

[Yes: Follows / No: Does not follow] the licensing requirements.

3rd party assets/code

[Yes: Follows ] the guidelines for 3rd party assets/code.

README.txt/README.md

[Yes: Follows] the guidelines for in-project documentation and/or the README Template.

Code long/complex enough for review

[Yes: Follows] the guidelines for project length and complexity.

Secure code

[Yes: Meets the security requirements.]

Coding style & Drupal API usage

[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:

  1. In automated testing giving "./README.txt: ASCII English text, with CRLF line terminators". check in "http://pareview.sh/"
  2. (*)When I clone the module then it was showing module name as "2745387" rather than "vocabulary_validation"
  3. (*)Remove newline at line number 66
  4. (*)form_set_error('name', t('The characters/words are not allowed to enter in the vocabulary - @findings', array('@findings' => implode(' ', $findings))));
    ;line no 80, as follow same for 84 and 87 so that i will easy for reading code

    form_set_error('name',
    t('The characters/words are not allowed to enter in the vocabulary - @findings',
    array('@findings' => implode(' ', $findings))
    ));
hiramanpatil’s picture

Hi @ajayNimbolkar,

Thanks for the review.

1) I am working on README.txt issue. Once done will update the code.

2) I think you haven't used full git clone URL. Please user below URL to clone the module. [see the module name at last]

git clone --branch 7.x-1.x https://git.drupal.org/sandbox/hiramanpatil/2745387.git vocabulary_validation

For point not 3 and 4 -

Can you please clone the updated module again? Because I have updated the code so the line no you have mentioned are not matching. Also please explain issue no 4 in details.

Thanks

ajaynimbolkar’s picture

Status: Needs review » Needs work
ajaynimbolkar’s picture

Hi hiramanpatil ,

Issue No 4 is not actual issue it was suggestion for writing module code will be within 80 character so that code can be read easily.

Thanks,
Ajay

hiramanpatil’s picture

Issue summary: View changes
hiramanpatil’s picture

Status: Needs work » Needs review

Hi @ajayNimbolkar,

Thanks for the review. I have updated the code and resolved 80 characters limit issue.

Thanks

visabhishek’s picture

Status: Needs review » Reviewed & tested by the community

Module working fine for me. I think we dont have blockers, So Marking as RTBC.

hiramanpatil’s picture

Issue tags: +PAreview: review bonus
hiramanpatil’s picture

Issue summary: View changes
hiramanpatil’s picture

Issue summary: View changes
heykarthikwithu’s picture

Generally reading values from the $form_state instead of $form is the good option.
$vocabulary = $form['name']['#value'];
Better you change this line of code.

Similar to few other modules username_validation, node_title_validation and term_name_validation, but it looks good :)

hiramanpatil’s picture

@heykarthikwithu

Thanks for the review and suggestions.

hiramanpatil’s picture

Priority: Normal » Major
hiramanpatil’s picture

Priority: Major » Critical
arun ak’s picture

It seems like #22 is still pending.

arun ak’s picture

Assigned: Unassigned » arun ak
hiramanpatil’s picture

@ARUN AK,

I think that's only suggestion from @heykarthikwithu.

Other contrib modules like username_validation, node_title_validation and term_name_validation uses the same code.

Thanks

misc’s picture

Assigned: arun ak » Unassigned
Issue tags: -PAreview: review bonus

Thanks for your contribution, hiramanpatil!

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.

misc’s picture

Status: Reviewed & tested by the community » Fixed
hiramanpatil’s picture

Thank you @MiSc for giving me the GIT access.

Thank you all for reviewing this module.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

avpaderno’s picture

Priority: Critical » Normal
Issue tags: +PAreview: review bonus
avpaderno’s picture