[Rt-devel] Queue_Overlay::ValidateName in 3.2.2 vs 3.4.4

Jens Porup Jens.Porup at strategicdata.com.au
Thu Dec 1 01:35:07 EST 2005


On Thu, Dec 01, 2005 at 01:27:30AM -0500, Jesse Vincent wrote:
> > > > already been created before doing so. Like this:
> > > > 
> > > > 	if (RT::Queue->ValidateName("ws-$id"))
> > > 
> > > Nope. you can't do that.   
> > 
> > Hmmm... but it works in 3.2.2. And there appear to be lots of Class-based
> > method calls throughout the code. Why is this bad? I don't understand.
> 
> Because the validate methods are object methods, not class methods. It's
> sometimes important to be able to look at an object when validating one
> of its attributes.

OK. Then what is the appropriate way to validate a proposed queue name?
I don't have the object until it's created, and I want to validate it
before I create it. How do I escape this catch-22?

Thanks,

Jens


More information about the Rt-devel mailing list