You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Parse uid from canonical ID (format: <slug>-<7hexchars>)
@@ -159,12 +160,12 @@ async function main() {
159
160
){
160
161
errors.push({field: 'End time',found: endTime,message: 'End time must be later than start time for single-day events.'});
161
162
}
162
-
if(eventPageUrl&&!isValidHttpUrl(eventPageUrl))errors.push({field: 'Event page URL',found: eventPageUrl,message: 'Must be a valid URL starting with `http://` or `https://`.'});
163
-
if(forumThreadUrl&&!isValidHttpUrl(forumThreadUrl))errors.push({field: 'Forum discussion URL',found: forumThreadUrl,message: 'Must be a valid URL starting with `http://` or `https://`.'});
163
+
if(eventPageUrl&&!isValidHttpUrl(eventPageUrl))errors.push({field: 'Event page URL',found: eventPageUrl,message: 'Not a valid URL. Please enter a web address like `https://example.com/pcd-my-city-2026`.'});
164
+
if(forumThreadUrl&&!isValidHttpUrl(forumThreadUrl))errors.push({field: 'Forum discussion URL',found: forumThreadUrl,message: 'Not a valid URL. Please enter a web address like `https://discourse.processing.org/t/pcd-my-city-2026`.'});
164
165
if(contactEmail&&!isValidEmail(contactEmail))errors.push({field: 'Primary contact email',found: contactEmail,message: 'Not a valid email address. Please provide a valid email like `you@example.com`.'});
165
166
if(rawPlusCode&&!resolvedPlusCode)errors.push({field: 'Map placement (Plus Code)',found: rawPlusCode.replace(/\s+/g,'').toUpperCase(),message: 'Not a valid full global Plus Code. It should look like `8FW4V75V+8Q`. [Find your Plus Code →](https://plus.codes/)'});
166
-
if(eventUrl&&!isValidHttpUrl(eventUrl))errors.push({field: 'Event URL',found: eventUrl,message: 'Must be a valid URL starting with `http://` or `https://`.'});
167
-
if(organizationUrl&&!isValidHttpUrl(organizationUrl))errors.push({field: 'Organization website',found: organizationUrl,message: 'Must be a valid URL starting with `http://` or `https://`.'});
167
+
if(eventUrl&&!isValidHttpUrl(eventUrl))errors.push({field: 'Event URL',found: eventUrl,message: 'Not a valid URL. Please enter a web address like `https://example.com/pcd-my-city-2026`.'});
168
+
if(organizationUrl&&!isValidHttpUrl(organizationUrl))errors.push({field: 'Organization website',found: organizationUrl,message: 'Not a valid URL. Please enter a web address like `https://example.com`.'});
168
169
if(eventFormat&&!VALID_EVENT_FORMATS.has(eventFormat))errors.push({field: 'Event format',found: eventFormat,message: 'Not a recognized option. Please choose one of: `In person` or `Online`.'});
169
170
if(organizationType&&!VALID_ORG_TYPES.has(organizationType))errors.push({field: 'Organization type',found: organizationType,message: 'Not a recognized option. Please choose one of the valid options from the form.'});
170
171
if(isOnlineEvent&&!eventUrl)errors.push({field: 'Event URL',message: 'An event URL is required for online events. Please provide the URL where people can join.'});
// Resolve plus_code with smart recovery before validation
@@ -123,12 +124,12 @@ async function main() {
123
124
){
124
125
errors.push({field: 'End time',found: endTime,message: 'End time must be later than start time for single-day events.'});
125
126
}
126
-
if(eventPageUrl&&!isValidHttpUrl(eventPageUrl))errors.push({field: 'Event page URL',found: eventPageUrl,message: 'Must be a valid URL starting with `http://` or `https://`, e.g. `https://example.com/pcd`.'});
127
-
if(forumThreadUrl&&!isValidHttpUrl(forumThreadUrl))errors.push({field: 'Forum discussion URL',found: forumThreadUrl,message: 'Must be a valid URL starting with `http://` or `https://`.'});
127
+
if(eventPageUrl&&!isValidHttpUrl(eventPageUrl))errors.push({field: 'Event page URL',found: eventPageUrl,message: 'Not a valid URL. Please enter a web address like `https://example.com/pcd`.'});
128
+
if(forumThreadUrl&&!isValidHttpUrl(forumThreadUrl))errors.push({field: 'Forum discussion URL',found: forumThreadUrl,message: 'Not a valid URL. Please enter a web address like `https://forum.example.com/thread`.'});
128
129
if(contactEmail&&!isValidEmail(contactEmail))errors.push({field: 'Primary contact email',found: contactEmail,message: 'Not a valid email address. Please provide a valid email like `you@example.com`.'});
129
130
if(rawPlusCode&&!resolvedPlusCode)errors.push({field: 'Map placement (Plus Code)',found: rawPlusCode.replace(/\s+/g,'').toUpperCase(),message: 'Not a valid full global Plus Code. It should look like `8FW4V75V+8Q`. [Find your Plus Code →](https://plus.codes/)'});
130
-
if(eventUrl&&!isValidHttpUrl(eventUrl))errors.push({field: 'Event URL',found: eventUrl,message: 'Must be a valid URL starting with `http://` or `https://`.'});
131
-
if(organizationUrl&&!isValidHttpUrl(organizationUrl))errors.push({field: 'Organization website',found: organizationUrl,message: 'Must be a valid URL starting with `http://` or `https://`.'});
131
+
if(eventUrl&&!isValidHttpUrl(eventUrl))errors.push({field: 'Event URL',found: eventUrl,message: 'Not a valid URL. Please enter a web address like `https://example.com`.'});
132
+
if(organizationUrl&&!isValidHttpUrl(organizationUrl))errors.push({field: 'Organization website',found: organizationUrl,message: 'Not a valid URL. Please enter a web address like `https://example.com`.'});
132
133
if(eventFormat&&!VALID_EVENT_FORMATS.has(eventFormat))errors.push({field: 'Event format',found: eventFormat,message: 'Not a recognized option. Please choose one of: `In person` or `Online`.'});
133
134
if(organizationType&&!VALID_ORG_TYPES.has(organizationType))errors.push({field: 'Organization type',found: organizationType,message: 'Not a recognized option. Please choose one of the valid options from the form.'});
134
135
if(isOnlineEvent&&!eventUrl)errors.push({field: 'Event URL',message: 'An event URL is required for online events. Please provide the URL where people can join.'});
0 commit comments