Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Solve Problem This Ruels Validator

$
0
0
this is my code :D
what correct this code ?

	public function rules()
	{
		if(isset($_POST['ProfileViewModel']['username']))
		{
			$rulesArray[] = array('username', 'length', 'min' => 3, 'max' => 20, 'message' => 'Incorrect username (length between 3 and 20 characters).');
		}
		
		$rulesArray[] =	array('nickname', 'length', 'max'=>50);
		$rulesArray[] = array('gender', 'length', 'max'=>6);

		return $rulesArray;
	}

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>