Prevent user to add multiple break lines in input form

@russian-dima Could you please tell me how to add “Action” to prevent it double Enter or multiple newlines. I get “ENTER pressed” in the log when I press Enter.