|
List Info
Thread: Validate and Locales
|
|
| Validate and Locales |

|
2006-10-30 01:24:23 |
Hi,
[This is an-only-validate-thread-starter, as I can't email
all of it's developers
One by one, then I decided to post it to .dev, although it's
a validate issue,
But would be nice to get comments from other developers,
especially ones who are
Maintaining packages with plug-ins]
We got some bug-reports which users ask us to add new chars
to
VALIDATE_ALPHA_LOWER and VALIDATE_ALPHA_UPPER[1][2], well as
it's a valid request
But the current structure of Validate is not very happy with
such requests.
I thought the best solution could be moving
VALIDATE_ALPHA_LOWER and UPPER from
two global constants to two class attributes which could be
overwritten by locales.
But it's not the best ATM because:
I) We've some locales, which are not depended on main
Validate, so they'll never
Instantiate it.
II) ATM We've some chars from languages which doesn't have a
locale in Validate.
The other way could be writing a Unicode (or simpler a
UTF-8) plug-in for Validate
Which handles such stuff.
Ideas? Blames?
P.S: We're going to release the first stable of Validate,
soon after fixing this
Issue and filling the docs gap, as it's functioning well in
validating other stuff.
[1] http://pear.
php.net/bugs/bug.php?id=9156
[2] http://pear.
php.net/bugs/bug.php?id=7648
Cheers,
-- Amir Mohammad
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|
|
| Validate_be |

|
2006-11-24 05:22:18 |
I can now restart development Validate BE.
I see that I trim values before try to validate.
But I'm not sure that's a good idea.
If the value contain trainling space, developper can decide
if it's good
or not. an trim it self if needed.
no ?
-- Moosh -- claroline.net -- php.net === Php & Pear
& MySQL ===
http://moosh.et.son.brol
.be/ (fr) 11-2006 Forum PHP http://www.afup.org/
(fr) 02-2007 FOSDEM 07 http://www.fosdem.org/
(en)
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|
|
| Validate_be |

|
2006-11-24 06:30:02 |
validate should not do magic like that imho. It validates
and does not
modify the data, this can lead to hard to track bugs.
Arnaud.
Christophe Gesché wrote:
> I can now restart development Validate BE.
>
> I see that I trim values before try to validate.
>
> But I'm not sure that's a good idea.
>
> If the value contain trainling space, developper can
decide if it's good
> or not. an trim it self if needed.
>
> no ?
>
> -- Moosh -- claroline.net -- php.net === Php & Pear
& MySQL ===
> http://moosh.et.son.brol
.be/ (fr) 11-2006 Forum PHP http://www.afup.org/
> (fr) 02-2007 FOSDEM 07 http://www.fosdem.org/
(en)
>
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|
|
| Validate_be |

|
2006-11-26 14:50:22 |
Hi,
Well, as Arnaud has told already, that's not a good practice
for a Lib
that's supposed to do validating stuff, it's up to developer
to pass
the arguments trimmed or not.
-- Amir Mohammad
On Fri, 24 Nov 2006 06:22:18 +0100
moosh.be gmail.com (Christophe Gesché) wrote:
> I can now restart development Validate BE.
>
> I see that I trim values before try to validate.
>
> But I'm not sure that's a good idea.
>
> If the value contain trainling space, developper can
decide if it's good
> or not. an trim it self if needed.
>
> no ?
>
> -- Moosh -- claroline.net -- php.net === Php & Pear
& MySQL ===
> http://moosh.et.son.brol
.be/ (fr) 11-2006 Forum PHP http://www.afup.org/
> (fr) 02-2007 FOSDEM 07 http://www.fosdem.org/
(en)
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|
|
| Validate_be |

|
2006-11-26 14:50:22 |
Hi,
Well, as Arnaud has told already, that's not a good practice
for a Lib
that's supposed to do validating stuff, it's up to developer
to pass
the arguments trimmed or not.
-- Amir Mohammad
On Fri, 24 Nov 2006 06:22:18 +0100
moosh.be gmail.com (Christophe Gesché) wrote:
> I can now restart development Validate BE.
>
> I see that I trim values before try to validate.
>
> But I'm not sure that's a good idea.
>
> If the value contain trainling space, developper can
decide if it's good
> or not. an trim it self if needed.
>
> no ?
>
> -- Moosh -- claroline.net -- php.net === Php & Pear
& MySQL ===
> http://moosh.et.son.brol
.be/ (fr) 11-2006 Forum PHP http://www.afup.org/
> (fr) 02-2007 FOSDEM 07 http://www.fosdem.org/
(en)
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|
|
| Validate_be |

|
2006-11-26 14:51:57 |
Hi,
Well, as Arnaud has told already, that's not a good practice
for a Lib
that's supposed to do validating stuff, it's up to developer
to pass
the arguments trimmed or not.
-- Amir Mohammad
On Fri, 24 Nov 2006 06:22:18 +0100
moosh.be gmail.com (Christophe Gesché) wrote:
> I can now restart development Validate BE.
>
> I see that I trim values before try to validate.
>
> But I'm not sure that's a good idea.
>
> If the value contain trainling space, developper can
decide if it's good
> or not. an trim it self if needed.
>
> no ?
>
> -- Moosh -- claroline.net -- php.net === Php & Pear
& MySQL ===
> http://moosh.et.son.brol
.be/ (fr) 11-2006 Forum PHP http://www.afup.org/
> (fr) 02-2007 FOSDEM 07 http://www.fosdem.org/
(en)
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|
|
| Validate_be |

|
2006-11-26 14:51:57 |
Hi,
Well, as Arnaud has told already, that's not a good practice
for a Lib
that's supposed to do validating stuff, it's up to developer
to pass
the arguments trimmed or not.
-- Amir Mohammad
On Fri, 24 Nov 2006 06:22:18 +0100
moosh.be gmail.com (Christophe Gesché) wrote:
> I can now restart development Validate BE.
>
> I see that I trim values before try to validate.
>
> But I'm not sure that's a good idea.
>
> If the value contain trainling space, developper can
decide if it's good
> or not. an trim it self if needed.
>
> no ?
>
> -- Moosh -- claroline.net -- php.net === Php & Pear
& MySQL ===
> http://moosh.et.son.brol
.be/ (fr) 11-2006 Forum PHP http://www.afup.org/
> (fr) 02-2007 FOSDEM 07 http://www.fosdem.org/
(en)
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|
|
| Validate_be |

|
2006-11-26 18:32:12 |
Amir Mohammad Saied a écrit :
> Hi,
>
> Well, as Arnaud has told already, that's not a good
practice for a Lib
> that's supposed to do validating stuff, it's up to
developer to pass
> the arguments trimmed or not.
>
Be care, my English was perhaps erroneous.
The method don't "change" value"
but validate as right a right value with trailing space (if
the trim
result is valid
But I would remove it.
I see alos that my phone validation is wrong. I need to
change it
before go to a beta or rc state
> -- Amir Mohammad
>
> On Fri, 24 Nov 2006 06:22:18 +0100
> moosh.be gmail.com (Christophe Gesché) wrote:
>
>
>> I can now restart development Validate BE.
>>
>> I see that I trim values before try to validate.
>>
>> But I'm not sure that's a good idea.
>>
>> If the value contain trainling space, developper
can decide if it's good
>> or not. an trim it self if needed.
>>
>> no ?
>>
>> -- Moosh -- claroline.net -- php.net === Php &
Pear & MySQL ===
>> http://moosh.et.son.brol
.be/ (fr) 11-2006 Forum PHP http://www.afup.org/
>> (fr) 02-2007 FOSDEM 07 http://www.fosdem.org/
(en)
>>
>
>
--
Moosh -- claroline.net -- php.net
=== Php & Pear & MySQL ===
http://moosh.et.son.brol
.be/ (fr)
11-2006 Forum PHP http://www.afup.org/ (fr)
02-2007 FOSDEM 07 http://www.fosdem.org/
(en)
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|
|
[1-8]
|
|