function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to show error message while saving Content Version?




When we add tags to some object say opportunity, salesforce allows to save tags that contain comma, underscores, dashes, letters and numbers. Special symbols and characters are not allowed.


Now what i am trying to achieve is as follows:


I am trying to upload a file to workspace using content version object. While uploading the file i am also adding some tags. So even when the user enters special symbols he is allowed to save the file and the tags also appear in workspace. I want to force the user to only enter numbers, dashes, letters, underscores, comma. If he enters other values, he must get an error message.


Can't you do this by using Validation rules?