Activity Forums Salesforce® Discussions Restricting characters and removing space at the end of a field?

  • Restricting characters and removing space at the end of a field?

    Posted by Tanu on August 8, 2016 at 1:51 PM

    I want to restrict the following characters ‘ “ , * % @ and if possible remove any extra spaces at the end of the field. , I don't really want to have to input every single charachter other than those listed above.  Any guidence would greatly be appreciated.

    Abhinav replied 10 years ago 2 Members · 1 Reply
  • 1 Reply
  • Abhinav

    Member
    August 9, 2016 at 8:41 AM

    Hi Tanu,

    You can use this formula example to validate against usage of those special characters and checking if there are spaces at the end.

    OR(
    CONTAINS( Text_Field__c , "'"),
    CONTAINS( Text_Field__c , '"'),
    CONTAINS( Text_Field__c , ","),
    CONTAINS( Text_Field__c , "*"),
    CONTAINS( Text_Field__c , "%"),
    CONTAINS( Text_Field__c , "@"),
    CONTAINS(RIGHT(Text_Field__c, 1), " ")
    )

    I hope this helps.

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Skip to toolbar