Re: IpV6
if there are actually two :: in it, yes see ...3::8... On 10 Jun., 22:29, Emanuele Gringeri emanuel...@gmail.com wrote: is |2001:db8:85a3::8a2e:370:7334|, invalid? On 06/10/10 16:16, euromark wrote: it still returns false? i guess the ip you process is invalid then... On 10 Jun., 16:16, emanuele emanuel...@gmail.com wrote: Thanks Dude. even though Validation::ip return always false. May be the regexp dosen't complain every possible ipv6 format.. On Wed, Jun 9, 2010 at 5:50 PM, euromark dereurom...@googlemail.com wrote: im sry the validation array is too flat (i just copied it) var $validate = array( 'ip' = array( 'validIp' = array( 'rule' = 'ip', 'message' = 'Please supply a valid IP v4/ v6 address.' ) ) ); if ip is your ip field validIp is the name for the rule, you can name it whatever you want you only need this one rule! as i mentioned before, ip already validates BOTH it doesnt make sense to split em up in your case you will only make it fail every time - because it cant be both at the same time (only either one) On 9 Jun., 14:26, emanuele emanuel...@gmail.com wrote: 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 dereurom...@googlemail.com 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 emanuel...@gmail.com 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 sitehttp://cakeqs.organdhelp 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.c omFor 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 sitehttp://cakeqs.organdhelp 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor 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 sitehttp://cakeqs.organd 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group
IpV6
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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: IpV6
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') would only validate pure v6 ips On 9 Jun., 12:50, emanuele emanuel...@gmail.com 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: IpV6
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 dereurom...@googlemail.com 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 emanuel...@gmail.com 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: IpV6
im sry the validation array is too flat (i just copied it) var $validate = array( 'ip' = array( 'validIp' = array( 'rule' = 'ip', 'message' = 'Please supply a valid IP v4/ v6 address.' ) ) ); if ip is your ip field validIp is the name for the rule, you can name it whatever you want you only need this one rule! as i mentioned before, ip already validates BOTH it doesnt make sense to split em up in your case you will only make it fail every time - because it cant be both at the same time (only either one) On 9 Jun., 14:26, emanuele emanuel...@gmail.com wrote: 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 dereurom...@googlemail.com 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 emanuel...@gmail.com 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 sitehttp://cakeqs.organd 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.c omFor 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en