Ticket #86 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

stubRegexValidator expects a string without the typical regex delimiters

Reported by: rist Assigned to: mikey
Priority: minor Milestone: 0.4.0
Component: core Version: SVN-trunk
Keywords: Cc:

Description

stubRegexValidator is documented with regex delimeters: $foo = $request->getValidatedValue(new stubRegexValidator('/bar/'), 'foo');

... but works only when regex delimeters are omitted: $foo = $request->getValidatedValue(new stubRegexValidator('bar'), 'foo');

Should be changed to the documented version to allow appending modifiers.

Change History

10/21/07 18:15:08 changed by mikey

  • status changed from new to closed.
  • resolution set to fixed.

Fixed with changeset 964. Unfortunately a BC-break had to be introduced to fix the issue. If a regular expression is supplied which does not contain delimiters the stubRegexValidator::validate() method will fail in applying the regular expresion and therefore throw a stubRuntimeException.