Zend Framework

Zend_Validate_Alnum should have emptiness checking optional.

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: 1.8.1
  • Component/s: Zend_Validate
  • Labels:
    None

Description

The option for isEmpty check in Alnum validator should be optional because. Not there is problem with combining it with StringLength because of duplicate error about string emptiness and length.

Activity

Hide
Wil Sinclair added a comment -

Please evaluate and categorize/assign as necessary.

Show
Wil Sinclair added a comment - Please evaluate and categorize/assign as necessary.
Hide
Thomas Weidner added a comment -

Use "allowWhiteSpace" on the Alnum validator to accept/disallow whitespaces.
Use the "breakChainOnFailure" option on any validator to prevent the next validator from being executed.

So I think it's better to use something like

addValidator('StringLength', true, $options);

(note the true which prevents the next validation), instead of promoting a new option only for a single validator.

Show
Thomas Weidner added a comment - Use "allowWhiteSpace" on the Alnum validator to accept/disallow whitespaces. Use the "breakChainOnFailure" option on any validator to prevent the next validator from being executed. So I think it's better to use something like
addValidator('StringLength', true, $options);
(note the true which prevents the next validation), instead of promoting a new option only for a single validator.
Hide
Thomas Weidner added a comment -

Closing for the reason as described before

Show
Thomas Weidner added a comment - Closing for the reason as described before

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: