If inputted text doesn't match with my pattern:
^(\b[\n]\w*\s*)+$
Which is if finding \n character in the inputted text then the text will not be validated, but I want to add min and max length to all whole string. I expect if the text doesn't match the pattern and string length lower than 3 and exceed 10 then it will not be validated, I know this following pattern is not correct but at least I'm trying to modify it like this:
^(\b[\n]\w{3,10}\s*)+$
For sample:
FrogFrog
FrogFrog <- it won't validated because has \n and exceed 10
Frog
Frog <- it won't validated because has \n
FrogFrogFrog <- it wont't validated because exceed than 10
FrogFrogFr <- it is valid because no \n character and not exceed than 10
Any correction or suggestions?