Ticket #831 (closed enhancement: duplicate)

Opened 7 months ago

Last modified 5 weeks ago

TPage::validate should return a value.

Reported by: sergeymorkovkin Owned by: xue
Priority: low Milestone: 3.1.3
Component: Prado Framework v3 Version: 3.1
Severity: minor Keywords:
Cc:

Description

When validating different validation groups it would be very convenient to receive a validation result in return to $this->validate('group') call. This will let developers to write constructs like the following one:

if ($this->validate() && $this->validate('additional') && ...) {

}

Otherwise we'll need to write hard-readable code:

$this->validate(); if ($this->getIsValid()) {

$this->validate('additional'); if ($this->getIsValid()) ...

}

Change History

Changed 4 months ago by knut

  • type changed from defect to enhancement
  • milestone set to 3.1.3

Changed 3 months ago by knut

I think I need a better use case to accept this ticket. Redundant validation decrease performance and TPage->validate() is invoked in raisePostBackEvent so you only need to check the IsValid?-property according to what you are validating.

Changed 5 weeks ago by mikl

  • status changed from new to closed
  • resolution set to duplicate

moved to google

Note: See TracTickets for help on using tickets.