frnkly talking i havn't read too much regular expression part from from my books but today it's kind of something that i need to do and i lack time for that.
First of all need a really cool tuto to get myself into it.But i'm working in a project that need some validation to be done.And i have to fix that today.For the time i i'ld be done with the tuto i'll be late.Can somebody guide me trhough this?
ok i need to validate a text field with numbers.The user can write one or more numbers starting with the country code 233 followed by nine digit without leading 0, without space.if it one correct number followed by , it should be able to remove it but if it is more than one i can explode it but basically this is it.only 12 digits ,starting with 233,followed by 9 without 0 at the begining and can be one or more comma separeted.
the first one i did for one numbe is this ( but don't laugh
Code: Select all
private function validateTxtNumber($value)
{
return (!eregi('^[1-9]{12}$', $value)) ? 0 : 1;
}some little help would be appreciated thanks a lot