I have a page with a free format text area in an input form. I would like to validate the text entered into the form to limit it to 5 rows. When the submit button of the form is clicked I can of course trigger validation of the text area. I cannot visualise how I can count the number of lines a user has filled in to set up an error message when more than 5 lives have been typed in. Of course it also has to handle a user entering just a couple of words on a line and hitting enter.