mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
fix: fixes PIN 4 digit length error (#6265)
This commit is contained in:
@@ -420,6 +420,8 @@ export const ResponseOptionsCard = ({
|
||||
/>
|
||||
</div>
|
||||
</AdvancedOptionToggle>
|
||||
|
||||
{/* Protect Survey with Pin */}
|
||||
<AdvancedOptionToggle
|
||||
htmlId="protectSurveyWithPin"
|
||||
isChecked={isPinProtectionEnabled}
|
||||
@@ -442,6 +444,7 @@ export const ResponseOptionsCard = ({
|
||||
defaultValue={localSurvey.pin ? localSurvey.pin : undefined}
|
||||
onKeyDown={handleSurveyPinInputKeyDown}
|
||||
onChange={(e) => handleProtectSurveyPinChange(e.target.value)}
|
||||
maxLength={4}
|
||||
/>
|
||||
{verifyProtectWithPinError && (
|
||||
<p className="pt-1 text-sm text-red-700">{verifyProtectWithPinError}</p>
|
||||
|
||||
@@ -849,7 +849,7 @@ export const ZSurvey = z
|
||||
recaptcha: ZSurveyRecaptcha.nullable(),
|
||||
isSingleResponsePerEmailEnabled: z.boolean(),
|
||||
isBackButtonHidden: z.boolean(),
|
||||
pin: z.string().min(4, { message: "PIN must be a four digit number" }).nullish(),
|
||||
pin: z.string().length(4, { message: "PIN must be a four digit number" }).nullish(),
|
||||
resultShareKey: z.string().nullable(),
|
||||
displayPercentage: z.number().min(0.01).max(100).nullable(),
|
||||
languages: z.array(ZSurveyLanguage),
|
||||
|
||||
Reference in New Issue
Block a user