Prevent user to add multiple break lines in input form

I think it could be something like: preventDefault()
but How : )