Unable to validate length max >= 300?

I came across an interesting issue. We have a contact form where we do not want the user to sent a message over 300 characters long. Here are my rules:




	public function rules()

	{

		return array(			

			array('name, email, subject, body', 'required'),

                        array('body','length','max'=>300),

			array('email', 'email'),                        

		);

	}



For some reason, all the other rules worked, but I could still send a message over 300 characters. Eventually I determined that this rule worked for any value up to 299, but anything over 300 no longer gets validated.

Thoughts?