good hint. Just following the book I ve the following rules in the model
var $validate = array(
'ipV4Address' => array(
'rule' => 'ip',
'message' => 'Please supply a valid IP v4
address.'
),
'ipV6Address' => array(
'rule' => 'validateIpV6Address',
'message' => 'Please supply a valid IP v6
address'
),
'identifier' => array(
'rule' => 'alphaNumeric',
'message' => 'Please provide a valid identifier'
)
);
function validateIpV6Address($ip) {
return Validation::ip($ip, 'IPv6');
}
$ip contains a valid ipV6 address but false is always returned. What's wrong
with my code?
thanks in advance
On Wed, Jun 9, 2010 at 1:24 PM, euromark <[email protected]> wrote:
> http://book.cakephp.org/view/142/ip
> is a little bit outdated
>
> "ip" does validate BOTH by default!
>
> var $validate = array(
> 'clientip' => array(
> 'rule' => 'ip',
> 'message' => 'Please supply a valid IP address.'
> )
> );
>
> but Validation::ip($check, 'ipv6') wou
>
>
> On 9 Jun., 12:50, emanuele <[email protected]> wrote:
> > Hello fellows, is there any chance to validate an IP v6? Can u please
> give
> > some hint?
> > thanks in advance
> >
> > --
> > Emanuele Gringeri
> > Computer Engineer
> > University of Pisa
> > Be my mirror, my sword and shield
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
> more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
--
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en