Yii Framework Forum: validate issue - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

validate issue Rate Topic: -----

#1 User is offline   riccardo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 02-March 10

Posted 09 March 2010 - 03:54 AM

Hi,

validation examples show something like this:

array('var1','var2','required'),


so in one line you should validate two variables.


But i tried to do so and it gives an error:

PHP Error

Description

YiiBase::include(var2.php) [<a href='function.YiiBase-include'>function.YiiBase-include</a>]: failed to open stream: No such file or directory

Source File

/home/reporter/webapps/yii/framework_yii/framework/YiiBase.php(338)

00326: * @param string class name
00327: * @return boolean whether the class has been loaded successfully
00328: */
00329: public static function autoload($className)
00330: {
00331: // use include so that the error PHP file may appear
00332: if(isset(self::$_coreClasses[$className]))
00333: include(YII_PATH.self::$_coreClasses[$className]);
00334: else if(isset(self::$_classes[$className]))
00335: include(self::$_classes[$className]);
00336: else
00337: {
00338: include($className.'.php');
00339: return class_exists($className,false) || interface_exists($className,false);
00340: }
00341: return true;
00342: }
00343:
00344: /**
00345: * Writes a trace message.
00346: * This method will only log a message when the application is in debug mode.
00347: * @param string message to be logged
00348: * @param string category of the message
00349: * @see log
00350: */


while doing one at time :

array('var1','required'),
array('var2','required'),

it works.

Anyone can expalin why?
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 09 March 2010 - 04:28 AM

View Postriccardo, on 09 March 2010 - 03:54 AM, said:


validation examples show something like this:

array('var1','var2','required'),


it's:

array('var1,var2','required'),

Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   riccardo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 02-March 10

Posted 09 March 2010 - 05:25 AM

Ok,
was my fault!

Tahnks so much

View Postmdomba, on 09 March 2010 - 04:28 AM, said:

it's:

array('var1,var2','required'),


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users