Skip to content

Commit

Permalink
Merge pull request #502 from SalesforceFoundation/feature/validate-ex…
Browse files Browse the repository at this point in the history
…ternal-url

W-7173930 - Validate External Signup URL
  • Loading branch information
kselvocki authored Nov 6, 2020
2 parents 3dec9af + 2a75ec4 commit 61d4708
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/objects/Volunteer_Job__c.object
Original file line number Diff line number Diff line change
Expand Up @@ -762,4 +762,12 @@
<protected>false</protected>
<url>/apex/{!$Setup.PackageSettings__c.NamespacePrefix__c}SendBulkEmail?jobId={!Volunteer_Job__c.Id}</url>
</webLinks>
<validationRules>
<fullName>ValidateExternalSignupUrl</fullName>
<active>true</active>
<description>Validates that the External Signup URL field begins with an expected URI Scheme.</description>
<errorConditionFormula>NOT(OR(ISBLANK(External_Signup_Url__c), REGEX(External_Signup_Url__c,"^(http|https|mailto).*")))</errorConditionFormula>
<errorDisplayField>External_Signup_Url__c</errorDisplayField>
<errorMessage>The External Signup Url value must begin with http, https, or mailto.</errorMessage>
</validationRules>
</CustomObject>
1 change: 1 addition & 0 deletions src/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@
<members>Job_Recurrence_Schedule__c.JRS_Weekly_Occurrence_Required</members>
<members>Volunteer_Hours__c.HoursRequiredOnCompletion</members>
<members>Volunteer_Hours__c.StatusMustBeSet</members>
<members>Volunteer_Job__c.ValidateExternalSignupUrl</members>
<members>Volunteer_Recurrence_Schedule__c.VRS_Days_of_Week_Required</members>
<members>Volunteer_Recurrence_Schedule__c.VRS_Weekly_Occurrence_Required</members>
<name>ValidationRule</name>
Expand Down

0 comments on commit 61d4708

Please sign in to comment.