- {renderOptionalInput('customSlug', 'Custom slug', 'text', {
- disabled: hasValue(shortUrlCreation.shortCodeLength),
- })}
+
+
+ Customize the short URL
+
+
+ Use a custom slug for your marketing campaigns, change the domain or set a specific length for
+ the auto-generated short code.
+
+ {renderOptionalInput('customSlug', 'Custom slug', 'text', {
+ disabled: hasValue(shortUrlCreation.shortCodeLength),
+ })}
+ {renderOptionalInput('shortCodeLength', 'Short code length', 'number', {
+ min: 4,
+ disabled: disableShortCodeLength || hasValue(shortUrlCreation.customSlug),
+ ...disableShortCodeLength && {
+ title: 'Shlink 2.1.0 or higher is required to be able to provide the short code length',
+ },
+ })}
+ {!showDomainSelector && renderOptionalInput('domain', 'Domain', 'text', {
+ disabled: disableDomain,
+ ...disableDomain && { title: 'Shlink 1.19.0 or higher is required to be able to provide the domain' },
+ })}
+ {showDomainSelector && (
+
+ setShortUrlCreation({ ...shortUrlCreation, domain })}
+ />
+
+ )}
+
+
-
- {renderOptionalInput('shortCodeLength', 'Short code length', 'number', {
- min: 4,
- disabled: disableShortCodeLength || hasValue(shortUrlCreation.customSlug),
- ...disableShortCodeLength && {
- title: 'Shlink 2.1.0 or higher is required to be able to provide the short code length',
- },
- })}
-
-
- {!showDomainSelector && renderOptionalInput('domain', 'Domain', 'text', {
- disabled: disableDomain,
- ...disableDomain && { title: 'Shlink 1.19.0 or higher is required to be able to provide the domain' },
- })}
- {showDomainSelector && (
-
- setShortUrlCreation({ ...shortUrlCreation, domain })}
- />
-
- )}
+
+
+
+ Limit access to the short URL
+
+ Determine when and how many times your short URL can be accessed.
+ {renderOptionalInput('maxVisits', 'Maximum number of visits allowed', 'number', { min: 1 })}
+ {renderDateInput('validSince', 'Enabled since...', { maxDate: shortUrlCreation.validUntil as m.Moment | undefined })}
+ {renderDateInput('validUntil', 'Enabled until...', { minDate: shortUrlCreation.validSince as m.Moment | undefined })}
+
+
-
-
- {renderOptionalInput('maxVisits', 'Maximum number of visits allowed', 'number', { min: 1 })}
-
-
- {renderDateInput('validSince', 'Enabled since...', { maxDate: shortUrlCreation.validUntil as m.Moment | undefined })}
-
-
- {renderDateInput('validUntil', 'Enabled until...', { minDate: shortUrlCreation.validSince as m.Moment | undefined })}
-
-
-
-
-
-
-
+
+ Extra validations
+
+
+ Make sure the long URL is valid, or ensure an existing short URL is returned if it matches all
+ provided data.
+
+
+
Validate URL
-
-
-
- setShortUrlCreation({ ...shortUrlCreation, findIfExists })}
- >
- Use existing URL if found
-
-
-
-
-
+
+
+
+
+ setShortUrlCreation({ ...shortUrlCreation, findIfExists })}
+ >
+ Use existing URL if found
+
+
+
+
+
+
>
)}
-