Development

#4877 (REGRESSION? sfValidatorAnd + sfValidatorString not functioning well)

You must first sign up to be able to contribute.

Ticket #4877 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

REGRESSION? sfValidatorAnd + sfValidatorString not functioning well

Reported by: colnector Assigned to: fabien
Priority: major Milestone:
Component: validation Version: 1.1.4
Keywords: Cc:
Qualification: Unreviewed

Description

I'm using the latest Symfony 1.1 through SVN. This validation definition used to work properly:

     	'first_name'                   => new sfValidatorAnd(array(
	    	new sfValidatorString(array('min_length' => 2, 'max_length' => 40)),
	    	new sfValidatorRegex(array('pattern' => '/^[\w ]+$/')),
	    	)),

but now when an empty string is give, the validation does NOT fail.

Changing to this:

     	'first_name'                   => #new sfValidatorAnd(array(
	    	new sfValidatorString(array('min_length' => 2, 'max_length' => 40)),
	    	#new sfValidatorRegex(array('pattern' => '/^[\w ]+$/')),
	    	#)),

Will issue a "Required" notice on an empty string.

Change History

11/18/08 10:25:42 changed by nicolas

The changeset r9411 changed the behavior, but six monthes ago. I'm investigating to find out why.

11/18/08 16:35:03 changed by nicolas

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

(In [13126]) reverted from r9411: sfValidatorAnd and sfValidatorOr validators are now required by default to ensure a standard behavior - fixes and closes #4877

11/18/08 16:36:00 changed by nicolas

(In [13127]) [1.2] forthport of r13126: sfValidatorAnd and sfValidatorOr validators are now required by default to ensure a standard behavior - fixes and closes #4877

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.