{"id":823,"date":"2026-07-26T09:00:00","date_gmt":"2026-07-26T03:30:00","guid":{"rendered":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/"},"modified":"2026-10-10T01:43:44","modified_gmt":"2026-10-09T20:13:44","slug":"salesforce-regex-validation-rule-examples","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/","title":{"rendered":"Salesforce REGEX Validation: PAN, GST, IFSC and Phone Formats"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Salesforce REGEX Validation lets you check that a value follows an exact pattern, such as a PAN number, a GSTIN or a 10-digit mobile number, before the record saves. In our <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-validation-rules-examples\/\">validation rules guide<\/a>, you built four rules for courses and met the REGEX function briefly. In our <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-formula-fields-field-types\/\">formula fields guide<\/a>, you learned text functions like LEN and UPPER. Now you will put them together and build a set of format rules that Indian businesses ask for all the time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, you will learn how the REGEX function reads a pattern, the two rules that trip up most admins, and ready-to-use formulas for PAN, GSTIN, IFSC, PIN code, mobile numbers and email domains. Then you will add them to the Bright Path Tutors org and test each one. Copy the formulas as they are, because every backslash and bracket matters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Salesforce REGEX Validation?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">REGEX stands for regular expression. A regular expression is a short pattern that describes what valid text looks like. For example, [0-9]{6} means &#8220;exactly six digits&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The REGEX function takes two inputs: the field and the pattern. It returns TRUE when the whole value matches the pattern. A validation rule shows its error when its formula is TRUE, so we wrap REGEX in NOT. In other words, &#8220;show an error when the value does not match&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a simple analogy. Think of a key and a lock. The pattern is the lock, and each value is a key. If the key does not fit every pin, the door stays shut, and the user sees your error message instead of a saved record.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Salesforce REGEX Validation Matters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Bad formats cause real trouble later. For example, an invoice with a wrong GSTIN can be rejected, so the finance team has to chase the customer and send it again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some real situations at Bright Path Tutors.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>School accounts need a valid GSTIN on every invoice.<\/li>\n\n<li>Trainers are paid by bank transfer, so the IFSC code must be correct.<\/li>\n\n<li>Sales reps type mobile numbers with spaces, dashes or a missing digit.<\/li>\n\n<li>Address PIN codes arrive with five digits or letters in them.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So a few REGEX rules stop these mistakes at the moment of entry, when the user still has the right value in front of them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Salesforce REGEX Validation Works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Each rule follows the same steps. First, the user saves a record. Next, Salesforce runs every active validation rule on that object. Then each REGEX rule compares the field with its pattern. If the value does not match, the formula returns TRUE and the save stops. Finally, the user fixes the value and saves again.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-1-1024x640.png\" alt=\"Salesforce REGEX Validation diagram showing a record save, the pattern check and the error for a mismatch\" class=\"wp-image-817\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-1-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-1-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-1-768x480.png 768w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-1-1536x960.png 1536w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-1-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">How Salesforce REGEX Validation works: the record saves, the pattern is checked, and a mismatch shows the error.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Two rules decide whether your pattern works at all.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>The pattern must match the whole value.<\/strong> REGEX does not search inside the text, so [0-9]{6} fails on &#8220;411001 Pune&#8221;.<\/li>\n\n<li><strong>Backslashes must be doubled.<\/strong> In formulas, the backslash is also an escape character. So the digit shortcut \\d becomes \\\\d, and a literal dot becomes \\\\.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Also, REGEX is case sensitive by default. Start the pattern with (?i) when case should not matter, or wrap the field in UPPER. Finally, REGEX works in validation rules and flows, but not in formula fields.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Salesforce REGEX Validation Patterns You Will Use<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most patterns use only a handful of building blocks. The table below explains them.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Pattern part<\/th><th>Meaning<\/th><th>Example match<\/th><\/tr><\/thead><tbody><tr><td>[0-9]<\/td><td>One digit<\/td><td>7<\/td><\/tr><tr><td>[A-Z]<\/td><td>One capital letter<\/td><td>K<\/td><\/tr><tr><td>{5}<\/td><td>Exactly five of the previous part<\/td><td>[A-Z]{5} matches ABCDE<\/td><\/tr><tr><td>?<\/td><td>The previous part is optional<\/td><td>(\\\\+91)? allows +91 or nothing<\/td><\/tr><tr><td>( )<\/td><td>Groups parts together<\/td><td>(\\\\+91)?<\/td><\/tr><tr><td>.*<\/td><td>Any text, any length<\/td><td>.*[0-9].* means &#8220;contains a digit&#8221;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you read these six parts, every formula in this post makes sense.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Salesforce REGEX Validation Examples for India<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Each example below uses the same shape. We skip blank values with ISBLANK, so the field stays optional unless you also make it required.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PAN number<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A PAN has five letters, four digits and one letter. The fourth letter shows the holder type, such as P for a person or C for a company.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\n  NOT(ISBLANK(PAN__c)),\n  NOT(REGEX(PAN__c, \"[A-Z]{3}[ABCFGHJLPT][A-Z][0-9]{4}[A-Z]\"))\n)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Error message: &#8220;Enter a valid 10-character PAN, for example ABCPK1234F.&#8221;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">GSTIN<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A GSTIN has 15 characters. It starts with a two-digit state code, then the PAN, then an entity number, the letter Z and a check character.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\n  NOT(ISBLANK(GSTIN__c)),\n  NOT(REGEX(GSTIN__c, \"[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]\"))\n)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">IFSC code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An IFSC has four letters for the bank, then a zero, then six letters or digits.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\n  NOT(ISBLANK(IFSC__c)),\n  NOT(REGEX(IFSC__c, \"[A-Z]{4}0[A-Z0-9]{6}\"))\n)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">PIN code and mobile number<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A PIN code has six digits and never starts with zero. Meanwhile, an Indian mobile number has ten digits starting with 6, 7, 8 or 9, with an optional +91.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\n  NOT(ISBLANK(BillingPostalCode)),\n  BillingCountry = \"India\",\n  NOT(REGEX(BillingPostalCode, \"[1-9][0-9]{5}\"))\n)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\n  NOT(ISBLANK(MobilePhone)),\n  NOT(REGEX(MobilePhone, \"(\\\\+91)?[6-9][0-9]{9}\"))\n)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Salesforce REGEX Validation Beyond Formats<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">REGEX also helps with simple content rules. These two come up often.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Email domain for trainers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Trainer contacts must use the company email domain. The pattern allows any name before the @ sign, and the doubled backslash makes the dot literal.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>AND(\n  RecordType.DeveloperName = \"Trainer\",\n  NOT(REGEX(Email, \"(?i).+@brightpath\\\\.example\"))\n)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">No digits in a last name<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This rule catches typing slips like &#8220;Mehta1&#8221;. Here the formula is TRUE when the name contains a digit anywhere.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>REGEX(LastName, \".*[0-9].*\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can also combine REGEX with other checks. For example, MID(GSTIN__c, 3, 10) &lt;&gt; PAN__c flags an account whose GSTIN does not contain its own PAN.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">REGEX vs Other Validation Methods<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">REGEX is not always the best tool. The table below compares it with simpler options.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Need<\/th><th>Best tool<\/th><th>Why<\/th><\/tr><\/thead><tbody><tr><td>Exact format like PAN<\/td><td>REGEX<\/td><td>Checks every character position<\/td><\/tr><tr><td>Only a length check<\/td><td>LEN<\/td><td>Simpler to read<\/td><\/tr><tr><td>Allowed values from a list<\/td><td>Picklist<\/td><td>No typing at all<\/td><\/tr><tr><td>Basic email format<\/td><td>Email field type<\/td><td>Salesforce checks it for you<\/td><\/tr><tr><td>Value must exist in another record<\/td><td>Lookup field<\/td><td>Real link instead of text<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In short, use a picklist or the right field type first. Then use REGEX when the value is free text but must follow a fixed shape.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-2-1024x640.png\" alt=\"Salesforce REGEX Validation diagram comparing REGEX with field types, LEN and picklists\" class=\"wp-image-818\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-2-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-2-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-2-768x480.png 768w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-2-1536x960.png 1536w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-diagram-2-2048x1280.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">When to use Salesforce REGEX Validation compared with field types and simpler formula checks.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Hands-on Example: Salesforce REGEX Validation for School Accounts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s add the GSTIN rule to the Account object in your Developer Edition org.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Create the field<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In Setup, open Object Manager, then Account, then Fields &amp; Relationships.<\/li>\n\n<li>Create a Text field called GSTIN with length 15.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Create the rule<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open Validation Rules on Account and click New.<\/li>\n\n<li>Name it GSTIN_Format and paste the GSTIN formula from above.<\/li>\n\n<li>Enter the error message &#8220;Enter a valid 15-character GSTIN, for example 27ABCPK1234F1Z5.&#8221; Show it next to the GSTIN field, then save.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Test it<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Save an account with &#8220;27ABCPK1234F1Z5&#8221;. It saves. Next, try &#8220;27abcpk1234f1z5&#8221;. It fails, because REGEX is case sensitive. If you want lowercase input to pass, change the formula to use UPPER(GSTIN__c). Better still, add a before-save flow that converts the field to capitals.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Check existing data<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Old records are not checked until someone edits them. SOQL cannot run REGEX, so developers can list every account that has a GSTIN with this query.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT Id, Name, GSTIN__c\nFROM Account\nWHERE GSTIN__c != null\nORDER BY Name<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Export the result, check the values in a spreadsheet, and fix them with Data Loader. Otherwise users will hit the new error the next time they edit those accounts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Salesforce REGEX Validation<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Single backslashes.<\/strong> Write \\\\d, not \\d, or the rule fails.<\/li>\n\n<li><strong>Forgetting the whole-value rule.<\/strong> REGEX never searches inside text.<\/li>\n\n<li><strong>No blank check.<\/strong> Without ISBLANK, an empty optional field shows the error.<\/li>\n\n<li><strong>Ignoring case.<\/strong> Use (?i) or UPPER when lowercase is acceptable.<\/li>\n\n<li><strong>Storing Aadhaar numbers.<\/strong> Do not store full Aadhaar numbers in a CRM. Use the last four digits or a verification flag instead.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Salesforce REGEX Validation<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Show an example in the error.<\/strong> Users fix the value faster when they see the format.<\/li>\n\n<li><strong>Test with real samples.<\/strong> Try five valid and five invalid values before activating.<\/li>\n\n<li><strong>Clean old data first.<\/strong> Fix existing records before you switch the rule on.<\/li>\n\n<li><strong>Add a description.<\/strong> Explain the pattern in plain words for the next admin.<\/li>\n\n<li><strong>Keep a bypass for integrations.<\/strong> Use a custom permission for data loads, as shown in our <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-order-of-execution\/\">order of execution guide<\/a>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Practice Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add the IFSC rule to a Trainer Bank Detail custom object. Then test it with &#8220;HDFC0001234&#8221;, &#8220;HDFC1001234&#8221; and &#8220;hdfc0001234&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hint: only the first value should save.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Salesforce REGEX Validation FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use REGEX in a formula field?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. REGEX works in validation rules and flows, but not in formula fields.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does REGEX check that a PAN or GSTIN really exists?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. It only checks the format. Checking that a number exists needs an integration with an official service.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does my pattern never match?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Usually the cause is a single backslash, a missing (?i), or extra spaces in the value. Test the value with TRIM first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=platform.customize_functions_regex.htm&amp;type=5\" target=\"_blank\" rel=\"noopener noreferrer\">REGEX Function (Salesforce Help)<\/a><\/li>\n\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=sf.fields_useful_validation_formulas.htm&amp;type=5\" target=\"_blank\" rel=\"noopener noreferrer\">Examples of Validation Rules (Salesforce Help)<\/a><\/li>\n\n<li><a href=\"https:\/\/trailhead.salesforce.com\/content\/learn\/modules\/point_click_business_logic\" target=\"_blank\" rel=\"noopener noreferrer\">Formulas and Validations (Trailhead)<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Salesforce REGEX Validation checks that a value follows an exact pattern.<\/li>\n\n<li>Wrap REGEX in NOT, and skip blank values with ISBLANK.<\/li>\n\n<li>The pattern must match the whole value, and backslashes must be doubled.<\/li>\n\n<li>PAN, GSTIN, IFSC, PIN code and mobile formats each need one short pattern.<\/li>\n\n<li>Use field types and picklists first, and REGEX for fixed-shape free text.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Your data now follows the right formats. Next, test your admin knowledge with interview questions sorted by topic. Read <a href=\"https:\/\/swapnilzambare.com\/blog\/top-salesforce-admin-interview-questions\/\">Top Salesforce Admin Interview Questions by Topic<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Salesforce REGEX Validation lets you check that a value follows an exact pattern, such as a PAN number, a GSTIN or a 10-digit mobile&hellip;<\/p>\n","protected":false},"author":1,"featured_media":819,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[67,8,13],"tags":[27,74,26,7],"swapz_series":[],"class_list":["post-823","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced-admin","category-salesforce","category-salesforce-admin","tag-data-management","tag-formulas","tag-intermediate","tag-salesforce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Salesforce REGEX Validation for PAN, GST and IFSC<\/title>\n<meta name=\"description\" content=\"Salesforce REGEX Validation with ready formulas for PAN, GSTIN, IFSC, PIN code and mobile numbers, plus the two rules that make patterns work.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Salesforce REGEX Validation for PAN, GST and IFSC\" \/>\n<meta property=\"og:description\" content=\"Salesforce REGEX Validation with ready formulas for PAN, GSTIN, IFSC, PIN code and mobile numbers, plus the two rules that make patterns work.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil Zambare - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-26T03:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-09T20:13:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil Zambare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil Zambare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/\"},\"author\":{\"name\":\"Swapnil Zambare\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/922ac0131aaa7088c78c2cb1700e0c9a\"},\"headline\":\"Salesforce REGEX Validation: PAN, GST, IFSC and Phone Formats\",\"datePublished\":\"2026-07-26T03:30:00+00:00\",\"dateModified\":\"2026-10-09T20:13:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/\"},\"wordCount\":1560,\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/salesforce-regex-validation-rule-examples-featured.png\",\"keywords\":[\"Data Management\",\"Formulas\",\"Intermediate\",\"Salesforce\"],\"articleSection\":[\"Advanced Admin\",\"Salesforce\",\"Salesforce Admin\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/\",\"name\":\"Salesforce REGEX Validation for PAN, GST and IFSC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/salesforce-regex-validation-rule-examples-featured.png\",\"datePublished\":\"2026-07-26T03:30:00+00:00\",\"dateModified\":\"2026-10-09T20:13:44+00:00\",\"description\":\"Salesforce REGEX Validation with ready formulas for PAN, GSTIN, IFSC, PIN code and mobile numbers, plus the two rules that make patterns work.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/#primaryimage\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/salesforce-regex-validation-rule-examples-featured.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/salesforce-regex-validation-rule-examples-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Salesforce REGEX Validation featured image: PAN, GST and IFSC format checks\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-regex-validation-rule-examples\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Salesforce REGEX Validation: PAN, GST, IFSC and Phone Formats\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"name\":\"Swapnil Zambare - Blog\",\"description\":\"Salesforce &amp; Tech Guides\",\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\",\"name\":\"Swapnil Zambare - Blog\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Swapnil Zambare - Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/theSwapnilZambare\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/922ac0131aaa7088c78c2cb1700e0c9a\",\"name\":\"Swapnil Zambare\",\"sameAs\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\"],\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/author\\\/swapnil-zambare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Salesforce REGEX Validation for PAN, GST and IFSC","description":"Salesforce REGEX Validation with ready formulas for PAN, GSTIN, IFSC, PIN code and mobile numbers, plus the two rules that make patterns work.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/","og_locale":"en_US","og_type":"article","og_title":"Salesforce REGEX Validation for PAN, GST and IFSC","og_description":"Salesforce REGEX Validation with ready formulas for PAN, GSTIN, IFSC, PIN code and mobile numbers, plus the two rules that make patterns work.","og_url":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/","og_site_name":"Swapnil Zambare - Blog","article_published_time":"2026-07-26T03:30:00+00:00","article_modified_time":"2026-10-09T20:13:44+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-featured.png","type":"image\/png"}],"author":"Swapnil Zambare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Swapnil Zambare","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/#article","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/"},"author":{"name":"Swapnil Zambare","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/922ac0131aaa7088c78c2cb1700e0c9a"},"headline":"Salesforce REGEX Validation: PAN, GST, IFSC and Phone Formats","datePublished":"2026-07-26T03:30:00+00:00","dateModified":"2026-10-09T20:13:44+00:00","mainEntityOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/"},"wordCount":1560,"publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-featured.png","keywords":["Data Management","Formulas","Intermediate","Salesforce"],"articleSection":["Advanced Admin","Salesforce","Salesforce Admin"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/","url":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/","name":"Salesforce REGEX Validation for PAN, GST and IFSC","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-featured.png","datePublished":"2026-07-26T03:30:00+00:00","dateModified":"2026-10-09T20:13:44+00:00","description":"Salesforce REGEX Validation with ready formulas for PAN, GSTIN, IFSC, PIN code and mobile numbers, plus the two rules that make patterns work.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-featured.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/10\/salesforce-regex-validation-rule-examples-featured.png","width":2400,"height":1260,"caption":"Salesforce REGEX Validation featured image: PAN, GST and IFSC format checks"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-regex-validation-rule-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Salesforce REGEX Validation: PAN, GST, IFSC and Phone Formats"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil Zambare - Blog","description":"Salesforce &amp; Tech Guides","publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/swapnilzambare.com\/blog\/#organization","name":"Swapnil Zambare - Blog","url":"https:\/\/swapnilzambare.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","width":512,"height":512,"caption":"Swapnil Zambare - Blog"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/theSwapnilZambare"]},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/922ac0131aaa7088c78c2cb1700e0c9a","name":"Swapnil Zambare","sameAs":["https:\/\/swapnilzambare.com\/blog"],"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=823"}],"version-history":[{"count":1,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/823\/revisions"}],"predecessor-version":[{"id":826,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/823\/revisions\/826"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/819"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=823"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}