-
Is there any way to validate UTF-8 in regex?
I have basic validation rules setup for name fields:
NOT(REGEX(FirstName, "^[A-Za-z\\. '-]+$"))
Want to allow only letters, periods, spaces, hyphens and apostrophes in the name field. The problem with this is that it does not allow accented characters (graphemes). I've tried some simplified ideas based on a regex tutorial and the Java Docs Salesforce links to, but they do not work:
NOT( REGEX( FirstName , "\\P{M}\\p{M}") )
NOT( REGEX( FirstName , "\\p{Alpha}") )
NOT( REGEX( FirstName , "\\X") )
Has anybody else run into this problem? How do you validate names with accent marks?
Log In to reply.
Popular Salesforce Blogs
![](https://images.forcetalks.com/wp-content/uploads/2023/12/12090028/sa_1702371110A.Kliazovich_article-1024x576.png)
What is Salesforce Digital Engagement in 2024?
What is Digital Engagement? Salesforce Digital Engagement is a customer service product that helps companies communicate with customers via messaging apps, webchats, in-app chats, and…
![](https://images.forcetalks.com/wp-content/uploads/2021/04/23100921/sa_1619172547Salesforce%2021%20Upcoming%20Events%20%20Releases%201-1024x576.png)
Upcoming Salesforce Events and Releases - 2021
Every year Salesforce comes up with an extravagant and magnificent series of events and 2021 is no different. A lot of exciting events and releases…
![](https://images.forcetalks.com/wp-content/uploads/2024/07/05142020/sa_1720186660Illustration__You_N%202-1024x576.png)
Quote Templates in Salesforce: What Do You Need to Know to Use Them Right
The C, P, and Q in CPQ stand for Configuration, Pricing, and Quote—a powerful combination that simplifies the proposal process. Creating accurate and professional-looking quotes…
Popular Salesforce Videos
How to Delete Preloaded Sample Data in New Salesforce Organizations
When Users begin a trial or subscription with Salesforce, their org comes with a set of sample data. This data includes Accounts, Contacts, and Opportunities.…
Build an App Home Lightning Page | Salesforce Lightning Tutorial
Learning Objectives After completing this unit, you’ll be able to: Add components to a Lightning page Configure the properties of a Lightning page and a…
Record Triggered Flows with Real Time Scenarios | Salesforce Tutorial
In this video, you will understand 1. What is Record triggered flow? 2. How and when to use Record triggered flows? 3. Real-time scenarios 4.…