Tipps für die häufig geforderte Feldvalidierung, die die Funktion REGEX() verwendet.
| Beschreibung | Formate | Validierung |
|---|---|---|
| Amerikanische Telefonnummer (ohne Durchwahl) | (999)_999-9999 +1_(999)_999-9999 | !REGEX(Phone,"^((\\+1)?\\s?\\(\\d{3}\\)\\s?\\d{3}\\-\\d{4})?$") |
| Amerikanische Rufnummer (mit Durchwahl) | Die oben genannten Formate plus: (999)_999-9999_x999... (999)_999-9999_Ext._999... (999)_999-9999_ext:_999... (beliebige Länge der Durchwahl) Akzeptiert : oder . nach ext oder x, und akzeptiert +1 vor der Nummer. | !REGEX(Phone,"^((\\+1)?\\s?\\(\\d{3}\\)\\s?\\d{3}\\-\\d{4})(\\s?(x|([Ee]xt[\\.:]?\\s?))\\d+)?)?$") |
| Sozialversicherungsnummer | 999-99-9999 | !REGEX(Social_Security_Number__c,"^(\\d{3}\\-\\d{2}-\\d{4})?$" |
| Amerikanische Postleitzahl (5-stellig) | 12345 | !REGEX(PostalCode,"^\\d{5}?$") |
| Amerikanische Postleitzahl (5- oder 9-stellig) | 12345 12345-6789 | !REGEX(PostalCode,"^(\\d{5}(\\-\\d{4})?)?$") |
| Brasilianische Telefonnummer (ohne Durchwahl) | (99)_9999-9999 (99)_99999-9999 +55 (99)_9999-9999 +55 (99)_99999-9999 | !REGEX(Phone,"^((\\+\\d{2}\\s)?\\(\\d{2}\\)\\s?\\d{4}\\d?\\-\\d{4})?$") |
| Brasilianische Rufnummer (mit Durchwahl) | Die oben genannten Formate plus die folgenden: [Telefon wie oben] ramal: 999… [Telefon wie oben] ramal 999… | !REGEX(Phone,"^((\\+\\d{2}\\s)?\\(\\d{2}\\)\\s?\\d{4}\\d?\\-\\d{4}(\\sramal:?\\s\\d+)?)?$") |
| Brasilianische CNPJ (Gewerbesteuer-ID) | 99.999.999/9999-99 | !REGEX(CNPJ__c,"^(\\d{2}\\.\\d{3}\\.\\d{3}/\\d{4}\\-\\d{2})?$") |
| Brasilianische Postleitzahl (5- oder 8-stellig) | 99999-999 99999 | !REGEX(PostalCode,"^(\\d{5}(\\-\\d{3})?)?$") |
| Brasilianischer CPF | 999.999.999-99 | !REGEX(CPF__c,"^(\\d{3}\\.\\d{3}\\.\\d{3}\\-\\d{2})?$") |
| Japanische Telefonnummer (ohne Durchwahl) |
99-9999-9999 |
!REGEX(Phone,"^[0-9]{2,4}-[0-9]{2,4}-[0-9]{3,4}$") |
|
Japanische Postleitzahl („-“ ist erforderlich) |
999-9999 |
!REGEX(PostalCode,"^[0-9]{3}-[0-9]{4}$") |
|
Japanische Postleitzahl (mit oder ohne „-“) |
999-9999 |
!REGEX(PostalCode,"^([0-9]{3}-[0-9]{4})?$|^[0-9]{7}+$") |
| Title Case-Wörter und Namen Deckt alle in der Regex aufgeführten Akzente ab und erzwingt Title Case (erster Buchstabe groß, der Rest klein) mit Ausnahme von speziellen Wörtern (in einigen Sprachen), da, de, di, do und dem Präfix d'. | Smith John de Souza Rio de Janeiro Brasília d'Onofrio di Lorenço | !REGEX(FirstName, "^((^|\\s)(((([DdO]')|Mc|Mac)?[A-ZÃÁÂÀÄÇÉÈÊËÍÌÎÏÕÒÔÓÖÛÚÙÜ][a-zãáàâäçéèêëíìîïñõôóòöûúùü]*)|(da|de|di|do)))*$") |
| Verhindern, dass Benutzer einen Zeilenumbruch in ein Textfeld eingeben, das mehrere Zeilen unterstützt. ¹ |
REGEX( ShippingStreet , '(.*\r?\n.*)*') | |
| Maximal drei Zeilen in einem Textfeld erlauben, das mehrere Zeilen unterstützt. ¹ |
REGEX( ShippingStreet , '(.*\r?\n.*){3,}')
| |
000386675

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.