Validation Pattern for multiline text in textarea

  • 17 July 2019
  • 0 replies
  • 49 views

Hi

I have a text area which can have upto 2 rows. Currently the applied validation on this text areaa validates if three or more characters has been entered or not. The validation pattern used is  ^.{3,}$

 This expression works fine if user enters data without pressing enter. But if the user presses enter button to reach the next line and then enters some text, the validation pattern fails to validate.

If i use (?m:(^.{3,}$)) then it sucessfully validates but on submitting it does not work


0 replies

Be the first to reply!

Reply