My case is not that a validator that does not allow setting specific  
error messages, I want to validate a file and errors out with a  
generic message on

- too large
- too small
- PHP Upload error
- ...

But I want to provide a more specific message on

- not provided by the user

I can do that currently by setting my generic message to all the  
specific cases that I do not want to cover and then setting my  
specific message to the generic 'error'. That seems like the wrong  
way round to me, 'not there' is a specific case like all other cases,  
the generic case is 'something went wrong, but we don't know what'.

Cheers

felix


On Jul 12, 2008, at 1:29 PM, David Zülke wrote:

> Yes, I think that should be the way forward instead. It seems to me
> that introducing a special error name for the most basic and generic
> <error> would be like putting the cart before the horse. We should
> rather fix the validators that don't have those features yet.
>
>
> David
>
>
>
> Am 11.07.2008 um 19:05 schrieb mugeso:
>
>> If you mean that,
>> I think some validators such as AgaviRegexValidator should be fix.
>> They don't specify why the error happens.
>>
>> David Zülke wrote:
>>> The general idea is that validators have specific error message code
>>> for actual problems encountered during validation. Examples are  
>>> "min"
>>> and "max" in the string validator. The generic <error> then  
>>> serves as
>>> the "you need to enter this" message.
>>>
>>> Or did I understand something wrong?
>>>
>>>
>>> David
>>
>> _______________________________________________
>> Agavi Dev Mailing List
>> [email protected]
>> http://lists.agavi.org/mailman/listinfo/dev
>>
>
>
> _______________________________________________
> Agavi Dev Mailing List
> [email protected]
> http://lists.agavi.org/mailman/listinfo/dev


_______________________________________________
Agavi Dev Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/dev

Reply via email to