robertszafa / moodportfolio

2 stars 1 forks source link

Tag regex #44

Closed robertszafa closed 5 years ago

robertszafa commented 5 years ago

Make Tags one word and <30 chars. Prevent duplicates on the front end - if a user adds a tag to a photo and that photo has already that tag, then we should prevent it from adding.

I can work on this tomorrow.

rahul-kothari commented 5 years ago

Just saw this. In case not implemented the idea is:

if((pat.test(INPUT_FROM_TEXTBOX))==true){//allow the small characters}

For limit of 30 characters: <input type="text" maxlength="30"> on the HTML of the textbox