google-code-export / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
2 stars 1 forks source link

Pattern being ignored in Custom Field validation #505

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please make sure you are including enough information to make this a valid
bug report: https://code.google.com/p/wordpress-custom-content-type-
manager/wiki/ReportingBugs

What steps will reproduce the problem? (Be *specific*)

1. Create new field of type "Text"
2. Set the Validation Rule to Pattern. Use preg_match is unchecked. I am trying 
to use a rule of ####-####-#### - ie, 3 groups of 4 number separated by a 
hyphen. I have also tried a simple pattern of just ####
3. Go to a post and enter something into the field that does not match the 
pattern and click on Update

What is the expected output?

If the entry in the field does not match the pattern, the error should be 
displayed as it does if the field is required (which is working on the same 
field, BTW)

What do you see instead?

Doesn't matter what you enter - numbers, letters, or anything at all, the post 
is updated without an error

Does the problem continue if you disable all other plugins? (plugin
conflicts cause a LOT of problems, so please isolate the problem)

Yes (as this is a new site I have not yet installed any other plugins)

Please copy and paste the system information that appears in a yellow textarea 
when you click on "Report a Bug" on any CCTM admin screen (this includes the 
version of the plugin, the version of PHP, the version of MySQL, a list of 
other active plugins etc.):

*SYSTEM INFO* 
------------------------ 
Plugin Version: 0.9.7.6-pl
WordPress Version: 3.5.1
PHP Version: 5.3.21
MySQL Version: 5.0.96-log
Server OS: Linux
Language: 
------------------------ 
ACTIVE PLUGINS: 
------------------------ 
CURRENT THEME: CJ Larkin Theme, based on HTML5 Blank v.0.1 

Original issue reported on code.google.com by pe...@fabulosa.co.uk on 19 Jun 2013 at 9:58

GoogleCodeExporter commented 9 years ago

Original comment by ever...@fireproofsocks.com on 19 Jun 2013 at 1:18

GoogleCodeExporter commented 9 years ago
I can't reproduce this:

* When performing an update of a post/page, the validation rule is enforced.
* When creating a new post/page with field that has a validation rule, the rule 
is enforced.
* When I disable the validation rule, I can save a page, but as soon as I turn 
it back on, the error is triggered as expected.

At one time I think I came across some combination of things that would cause 
this condition, but now I can't reproduce it at all... can you provide exact 
data to reproduce this?

Original comment by ever...@fireproofsocks.com on 29 Jul 2013 at 2:22