Re: Re[2]: [PEAR] [QF] - add rule - callback rule using built-in/registered rule inside
| From: | Bertrand Mansion | Date: | Tue, 27 Jan 2004 11:31:07 +0000 |
| Subject: | Re: Re[2]: [PEAR] [QF] - add rule - callback rule using built-in/registered rule inside | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10376@lists.php.net to get a copy of this message | ||
<Sebastian.Baran@dialcom.com.pl> wrote :
>
>
> Tuesday, January 27, 2004, 11:40:20 AM, you wrote:
>
>>> -----Original Message-----
>>> From: Sebastian Baran [mailto:Sebastian.Baran@dialcom.com.pl]
>>>
>>> I want to create custom callback rule. But part of it's functionality
>>> is going to be the same as one of built-in rules. My question is - is
>>> it possible to call built-in rule from my callback function? Or
>>> do I have to rewrite built-in rule functionality by hand in my
>>> function?
>
> MC> Depending on exactly what your rule is going to do,
> MC> could you not add the rules in the right order, so that the built-in one
> is
> MC> called before your custom callback one?
>
> MC> - Mike
>
>
> Well, I didn't think about it this way. It's good idea - I'll try to
> put two rules instead of one complex rule. This will be sufficient for
> most cases.
>
> But if I would like to have just one rule to overwrite error messages
> generated by two rules and display just one error message? For
> example:
> - one rule - built-in 'email' to initially check if email is ok
> - second rule - callback to check something more complex (for example
> if email is in DB or something).
>
> Is it good way to do it? Can I put both rules into one callback rule
> calling buil-in rule first?
I don't see any reason why you would want to do that ?
Bertrand Mansion
Mamasam