I am not good with JavaScript Regex, so I need help checking my string for validation.
I am getting these image names separated by comma: Chrysanthemum.jpg,Desert.png,Hydrangeas.gif,Jellyfish.jpg,
Now I want to check with this regex:
What is valid:
Chrysanthemum.jpg,Desert.png,Hydrangeas.gif,Jellyfish.jpg,Koala.jpg,Lighthouse.png,
What is not valid:
1. Chrysanthemum.jpg,Desert.png,Hydrangeas.gif,
2. Chrysanthemum.jpg,Desert.png,
3. Chrysanthemum.jpg,
Validation should only succeed when the amount of comma separated values are more than 3.