Signup form validation
I'm building a sign up form that looks like this:
How can I validate the confirmPassword field and make sure it is equal "===" to the password field?
SOLUTION: https://discord.com/channels/957797212103016458/1117525551079501917/1117532686299435038
32 Replies
Have you tried
string===password
?no I haven't
i'll try it out and let you know how it goes
Oh, that's not a scope you're using
no
should i?
I'm not sure that it's [directly] possible in the current version
Iirc there's a
.equals()
or something in betahmm
Morphs are probably the way to go, yeah
narrow not morph
Then you can also add more validation to
password
, like "must have at least one number" or whatever
Hmm, I suppose... not sure there's a difference thoughmorph is mutating
so has different IO
Eh, I guess
But they can be the same if you code it to be so
so it makes
Type<string>
vs Type<(in:string) => string>
you can't ^Not that it practically matters though
The validation applied will be the same
thats nice, thanks a lot
It will later
Fair enough
e.g morphs gonna support clone-before-morph or something
totally unrelated, is there an ETA for the next release?
thirthday
been trying out arktype lately and really enjoying
#announcements :)
thanks 🙏
is there a way to mark something as the answer here?
No
Well, you can link https://discord.com/channels/957797212103016458/1117525551079501917/1117527717403963474 in OP but that's it
done
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I would say
but well
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
My boat was lazy to actualy write in editor so thanks for correct impl
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Also note that there is an issue in the backlog to make this easier (not described yet but you get the high level idea from the title : P):
https://github.com/arktypeio/arktype/issues/485
thats great news