-3

In AngularJS, I am creating folder. When a folder is created with name containing - /:?"<>| characters , I want to do validation to show error message - "A folder name cannot contain any of the following special characters /:?"<>| ".

What logic should i use to do the validation for folder name?

1 Answers1

1

You may use str.match(regexp) on the filename string before the creation of the folder.

A. STEFANI
  • 6,707
  • 1
  • 23
  • 48