Hi!
The Drupal 8 version of this module currently has no README file included in the download. Please add one.

Thanks!
Frederick

CommentFileSizeAuthor
#41 interdiff.2870663.36-41.txt402 bytesfrederickjh
#41 2870663-41.field_validation.Add-READMEtxt-or-READMEmd.patch2.17 KBfrederickjh
#39 interdiff.2870663.36-39.txt2.17 KBfrederickjh
#39 2870663-39.field_validation.Add-READMEtxt-or-READMEmd.patch2.17 KBfrederickjh
#36 interdiff-2870663-34-36.txt2.16 KBmanuel.adan
#36 field_validation-add_readme_txt_file-2870663-36.patch2.06 KBmanuel.adan
#34 field_validation-Add_README.txt_to_Drupal_8_branch-2870663-32.patch2.83 KBamruth7349
#33 interdiff_21-32.txt2.67 KBamruth7349
#32 field_validation-Add_README.txt_to_Drupal_8_branch-2870663-32.patch2.83 KBamruth7349
#32 interdiff_21-32.txt2.67 KBamruth7349
#29 interdiff_21-27.txt2.69 KBamruth7349
#28 interdiff_21-27.txt2.69 KBamruth7349
#27 field_validation-Add_README.txt_to_Drupal_8_branch-2870663-27.patch2.83 KBamruth7349
#24 field_validation-Add_README.txt_to_Drupal_8_branch-2870663-24.patch2.84 KBamruth7349
#21 field_validation-Add_README.txt_to_Drupal_8_branch-2870663-21.patch2.31 KBamruth7349
#19 field_validation-Add_README.txt_to_Drupal_8_branch-2870663-19.patch2.23 KBfrederickjh
#19 Selection_663.png35.75 KBfrederickjh
#19 Selection_662.png12.21 KBfrederickjh
#18 field_validation-addingreadmefile-2870663-17.patch2.33 KBamruth7349
#16 2870663-16.patch2.01 KBamruth7349
#14 README.txt2.01 KBamruth7349
#11 interdiff.txt425 bytesDinesh18
#11 2870663-11.patch1.59 KBDinesh18
#9 interdif.txt1.2 KBDinesh18
#9 2870663-9.patch1.62 KBDinesh18
#7 interdiff.txt1.04 KBDinesh18
#7 2870663-7.patch1.59 KBDinesh18
#3 field_validation-readmefile-2870663-D8.patch1.56 KBioana apetri
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frederickjh created an issue. See original summary.

ioana apetri’s picture

Assigned: Unassigned » ioana apetri

I am working on this.

ioana apetri’s picture

Status: Active » Needs review
FileSize
1.56 KB

Here is the readme file. Please review thanks!

frederickjh’s picture

@yo30 Good Work!

frederickjh’s picture

@yo30 I think that the information for Drupal 8 from the project page should be added too.

Drupal8:
1, first make sure that the Field validation ruleset machine name using following pattern:
"Your Entity type" + '_' + "bundle", for example:
Entity type:node
bundle:article
So the Field validation ruleset machine name must be:
node_article

2, column is "value" or 'target_id' or ...

It may need some clear up and additions.

Greetings!

Frederick

volkswagenchick’s picture

Status: Needs review » Needs work

I only briefly looked at this patch, and it needs some work.
Here are some nitpicks

  1. +++ b/README.txt
    @@ -0,0 +1,65 @@
    + The Field validation module allows you to specify validation rules for field instances.
    ...
    + * Navigate through the 'admin/structure/field_validation' path, click on Add field validation rule set.
    

    Lines should break at 80 characters

  2. +++ b/README.txt
    @@ -0,0 +1,65 @@
    +   - Email,
    

    This list should not have commas at the end of each item

  3. +++ b/README.txt
    @@ -0,0 +1,65 @@
    + * This module was sponsored by FLTRP
    ...
    + Howard Ge
    

    Should include links to maintainers and supporting organizations.

Dinesh18’s picture

Status: Needs work » Needs review
FileSize
1.59 KB
1.04 KB

Here is the updated Patch and interdiff. Kindly provide the link for supporting organizations so that I can update and provide the updated patch.

Fixed comments mentioned in #6

volkswagenchick’s picture

Status: Needs review » Needs work

You should be able to find the link for supporting organization on the project page :)

  1. +++ b/README.txt
    @@ -0,0 +1,66 @@
    + The Field validation module allows you to specify validation rules for field instances.
    

    line breaks should be at 80 characters

  2. +++ b/README.txt
    @@ -0,0 +1,66 @@
    +    https://drupal.org/documentation/install/modules-themes/modules-7
    

    This is a D7 link :)

  3. +++ b/README.txt
    @@ -0,0 +1,66 @@
    + The Field validation module allows you to specify validation rules for field instances.
    

    Line breaks should be at 80 charcaters

Couple more nitpicks. Marking as needs work. Thanks for your work here!

Dinesh18’s picture

Status: Needs work » Needs review
FileSize
1.62 KB
1.2 KB

Here is the updated patch and interdiff.

volkswagenchick’s picture

Status: Needs review » Needs work

Looks good. Marking as needs work.

+++ b/README.txt
@@ -29,8 +30,8 @@ CONTENTS OF THIS FILE
+    https://www.drupal.org/docs/8/extending-drupal-8/installing-themes for

This is a link for installing themes.
The link for installation is:
https://www.drupal.org/node/1897420

Dinesh18’s picture

Status: Needs work » Needs review
FileSize
1.59 KB
425 bytes

Here is the updated patcha and interdiff as per comment #10

volkswagenchick’s picture

Status: Needs review » Reviewed & tested by the community

Looks good - links, spelling , formatting all look good. All nitpicks were addressed. Patch applied using simplytest.me
Marking RTBC.

manuel.adan’s picture

Assigned: ioana apetri » Unassigned
Status: Reviewed & tested by the community » Needs work

There are some misspellings:

+ NTRODUCTION
+ ------------

There is a 1 space indentation in all lines except the first header.

Anyway, it does not really provide much helpful information for site builders.

amruth7349’s picture

Assigned: Unassigned » amruth7349
Status: Needs work » Needs review
FileSize
2.01 KB

I added a README.txt file to the Field validation module as shown in 'https://www.drupal.org/docs/develop/documenting-your-project/readme-temp...' .

manuel.adan’s picture

Status: Needs review » Needs work

Contributed code should be provided as patch file. Please, take a look to https://www.drupal.org/patch

amruth7349’s picture

Status: Needs work » Needs review
FileSize
2.01 KB

I provided the code as patch file . I am a beginner, so I don't know that code should be provided as patch file . Please go through the file and review it.

frederickjh’s picture

Status: Needs review » Needs work

Hi @amruth7349 !
I have reviewed the file you attached and it is not a patch. The link provide in the previous comment was most likely not much help to you, as you have admitted you are new.

Please see the Advanced patch contributor guide. It has instructions that will help you start at the beginning. The other documentation linked assumes that you already have cloned this module's git repository, and made your changes to it so that you could then make a patch. This documentation does not make that assumption.

Just adding a .patch to the end of the file does not make a file a patch. You may need to learn git too as that is the version control system that is used by Drupal developers. freecodecamp.org has a nice guide to git that you might find helpful.

amruth7349’s picture

Status: Needs work » Needs review
FileSize
2.33 KB

I read the instructions from Advanced patch contributor guide. Here is my updated patch file. Please have a look at it and review it. Thanks @ frederickjh for your suggestions.

frederickjh’s picture

@amruth7349 you are getting closer as that is a patch file but it is not correct. It applies cleanly but does not add the README.txt file to the project.

Your patch is backwards your file should be an addition, which should be marked with a plus at the beginning of the line for your new file and for all the lines of that file (see the patch I attached). In your patch they are all minus signs (-) meaning that they will be removed.

Also the file name is wrong. This issue is to add a README.txt to the project but in your patch the file it is diffing against is called field_validation-addingreadmefile-2870663-17

I could tell you to try again, but I think that the best is to walk you through what I did to take your README.txt that you posted above to make it into a patch. If you are going to submit code to the Drupal project at least until the switch to using Gitlab is finished you will need to learn how to make patches.

First I cloned the projects git repository. You can find a link near the bottom of ever project page in the right hand sidebar to the project's code repository.

You can find the URI for the repository at the botom of the repository page, where it says clone.

Open a terminal and clone this repository. Change to the directory and add your README.txt file.

$ git clone https://git.drupal.org/project/field_validation.git
Cloning into 'field_validation'...
remote: Counting objects: 1457, done.
remote: Compressing objects: 100% (1404/1404), done.
remote: Total 1457 (delta 874), reused 0 (delta 0)
Receiving objects: 100% (1457/1457), 226.79 KiB | 310.00 KiB/s, done.
Resolving deltas: 100% (874/874), done.
Checking connectivity... done.

$ cd field_validation

$ wget https://www.drupal.org/files/issues/2019-03-07/README.txt
--2019-03-10 20:08:01--  https://www.drupal.org/files/issues/2019-03-10/field_validation-addingreadmefile-2870663-17_3.patch
Resolving www.drupal.org (www.drupal.org)... 151.101.1.175, 151.101.65.175, 151.101.129.175, ...
Connecting to www.drupal.org (www.drupal.org)|151.101.1.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2385 (2.3K) [text/plain]
Saving to: ‘field_validation-addingreadmefile-2870663-17_3.patch’

field_validation-addingreadmefile-28706 100%[==============================================================================>]   2.33K  --.-KB/s    in 0s      

2019-03-10 20:08:02 (77.8 MB/s) - ‘field_validation-addingreadmefile-2870663-17_3.patch’ saved [2385/2385]

Now that the file has been added we can check the git status and check that the file has been added and that we are on the correct branch of the project (We already are. If we weren't we should have used git checkout branchname before changing any code to switch branches).

$ git status
On branch 8.x-1.x
Your branch is up-to-date with 'origin/8.x-1.x'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	README.txt

nothing added to commit but untracked files present (use "git add" to track)

Now add the new file and commit it.

$ git add  README.txt
$ git commit -m'Issue #2870663 frederickjh with amruth7349 - Added README.txt file to the project for the Drupal 8 branch.'
[8.x-1.x c54c8bb] Issue #2870663 frederickjh with amruth7349 - Added README.txt file to the project for the Drupal 8 branch.
 1 file changed, 92 insertions(+)
 create mode 100644 README.txt

Now make the patch.
$ git diff -M origin/8.x-1.x > field_validation-Add_README.txt_to_Drupal_8_branch-2870663-19.patch

I would highly recommend that you try to do this yourself as if there are changes that are needed and you need to submit a new patch you will be ready.

One tip that the advanced Drupal patching guide does not have, if you have to submit a new patch instead of adding a new commit you can update your previous commit. First use git add filename to add the changed files then use git commit --amend. This will open the previous commit message in a text editor. If it does not need any changes just close it to finish the commit. After that you can make your new patch.

I have attached the patch that I made using this process. I have not yet looked at the text of the file but will do so next.

frederickjh’s picture

@amruth7349

+++ /dev/null
@@ -1,92 +0,0 @@
-The Field validation module allows you to specify validation rules for field
-instances.

This line in the 7.x version adds more information as to where the developer can find the UI for this module. "This module adds an extra tab to each field instance, allowing you to specify validation rules for your field instances."

+++ /dev/null
@@ -1,92 +0,0 @@
-INSTALLATION
-------------
-
-* Install as you would normally install a contributed Drupal module. Visit:
-  https://www.drupal.org/project/field_validation_deprecated/git-instructions
-  for further information.

The link on line 51 has nothing to do with installation of a module.

amruth7349’s picture

Thank you @frederickjh for your detailed explanation. You have made it easy to understand. I tried again as you did. I changed the link in line 51. This is the new patch file. Please go through it again and tell me if there are any changes to be made.

frederickjh’s picture

@amruth7349 This look good and the patch applies correctly. Good job!

Can the modules' maintainer(s) please now review the README.txt to see if there are any corrections or additions they would like to make?

I think I would make one more addition of the information that is in the Drupal 8 section of the projects home page. That way all the information is in the README.txt too. Point number 3 from that, the list of currently included field validations, you have already included. Not sure what the best title for this section should be. Maybe Developer Notes

Drupal8:
1, first make sure that the Field validation ruleset machine name using following pattern:
"Your Entity type" + '_' + "bundle", for example:
Entity type:node
bundle:article
So the Field validation ruleset machine name must be:
node_article

2, column is "value" or 'target_id' or ...

the UI will be improved in the future, use selection instead of input.

3, there are only a few validation rules:
Email,Regex,Length,Must be Empty, Unique, date range, blacklist, words count, integer, Ip, numeric, phone, plain text .

we will add more in the future.

manuel.adan’s picture

Status: Needs review » Needs work

Thank's @frederickjh and @amruth7349 for your contribution. I found some points to review:

  1. +++ b/README.txt
    @@ -0,0 +1,93 @@
    +* Requirments
    ...
    +instances.This module adds an extra tab to each field instance, allowing you
    ...
    +* Think in Drupal ¶
    

    Some spelling error, missed space after "." and extra space at line end.

  2. +++ b/README.txt
    @@ -0,0 +1,93 @@
    +REQUIREMENTS
    +-----------
    +
    +This module requires the following modules:
    +
    +* Ctools  (https://www.drupal.org/project/ctools)
    +* Entity API  (https://www.drupal.org/project/entity)
    

    The 8.x branch has not dependencies on third-party modules, it depends only on the field module provided by core.

About the ruleset naming, I think that configuration way corresponds to earlier versions and it is no longer valid. The configuration is made entirely by the UI. The main page of the module must be updated as well.

amruth7349’s picture

Status: Needs work » Needs review
FileSize
2.84 KB

I uploaded new patch file. I corrected spelling mistakes and other errors. Added Developer Notes as said by @frederickjh . Changed requirements and configuration. But I'm not sure with these changes. Please review it and verify the changes made.

frederickjh’s picture

@amruth7349 Now that you are resubmitting the patch it is helpful to also include an interdiff so others can quickly see what you changed from the first patch. See the Creating an interdiff guide on how to do this.

frederickjh’s picture

+++ b/README.txt
@@ -0,0 +1,114 @@
+The Field validation module allows you to specify validation rules for ¶
+field instances. This module adds an extra tab to each field instance, ¶
...
+Click on Add field validation rule set button. Select Entity type ¶
...
+* First make sure that the Field validation ruleset machine name using ¶
+  following pattern: "Your Entity type" + '_' + "bundle", for example: ¶
...
+   ¶

These lines all have trailing white space (spaces or tabs) that should be removed.

amruth7349’s picture

I removed trailing spaces and created an interdiff file. interdiff.txt is uploaded in file information table as interdiff_21-27.txt .

amruth7349’s picture

FileSize
2.69 KB

Here is interdiff.txt

amruth7349’s picture

FileSize
2.69 KB

Here is interdiff.txt

amruth7349’s picture

frederickjh’s picture

+++ b/README.txt
@@ -0,0 +1,114 @@
+   ¶

Line 85 still has one space on it.

Also for the interdiff to be useful you need to upload it too. Like in comments 7, 9, and 11 above.

amruth7349’s picture

amruth7349’s picture

FileSize
2.67 KB

Here is my interdiff.txt.

amruth7349’s picture

New patch after removing trailing space from 85 line and I have already uploaded interdiff.txt that i have created after this change.

frederickjh’s picture

@amruth7349 Thanks for the interdiff. It made it so much easier to review the patch with Dreditor. Which by the way looks good.

Regarding the section that I suggested you should add and you did about the ruleset naming, it was called into question by @manuel.adan. He thinks that this may no longer be the case for the Drupal 8 version as this refers to an older version of the module.

It would be good if we could get a maintainer to give some input about the section about ruleset naming of the README.txt

manuel.adan’s picture

  • Removed the field_validation_deprecated module from the recommended module list, as it is available only for the 7.x branch.
  • Configuration steps review. The list of available entity types is not the same on each site.
  • Developer notes review. As previously mentioned, the "manual" rule set naming came from an early 8.x version of the module. It also was removed from the module page. This section now mention how to program custom validators.
frederickjh’s picture

@manuel.adan

+++ b/README.txt
@@ -52,49 +49,16 @@
+Validators are plugins, you can program your own validator or extend some of
+the existing ones.

Is there any documentation to expand this? Maybe a link to pertinent d.o documentation? This informs the user that there is the possibly to do this but I think more information is needed to avoid support requests asking the how question.

manuel.adan’s picture

For the moment, we can link the Plugin API. There is no documentation and it will take some time, I'm afraid.

frederickjh’s picture

Added a link to the Plugin API.

frederickjh’s picture

Sorry, first time using dorgflow. The interdiff is wrong. I need to redo it. It seems that dorgflow does not add new files when it commits when pulling the previous patches.

frederickjh’s picture

Same patch this time with the correct interdiff.

manuel.adan’s picture

Status: Needs review » Reviewed & tested by the community

It finally looks fine for me, thank you ;)

  • manuel.adan committed 36824aa on 8.x-1.x
    Issue #2870663 by amruth7349, frederickjh, Dinesh18, manuel.adan, yo30:...
manuel.adan’s picture

Assigned: amruth7349 » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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