AfterClass-io / afterclass.io-v2

[alpha] v2 of https://afterclass.io!
https://afterclass-io.vercel.app
MIT License
4 stars 2 forks source link

[Feat][UI] Display message for school domains that are not yet supported #94

Open Jaylin0312 opened 3 months ago

Jaylin0312 commented 3 months ago

Current Implementation

Currently, the web app will display "Please enter a valid school email address" for school domains that are not yet supported by AfterClass.

Screenshot 2024-04-23 at 12 41 15 AM

Potential Issues

The error message might be misleading considered the school domain is indeed valid, just that it is yet to be supported

Discussion

davidlhw commented 3 months ago

this can be done by manipulating the zod object used in react-hook-form at @/common/tools/zod/schemas.ts#L13-L20

currently, we already display a basic meessage on the form input itself and this should be sufficient for our first release:

image

for future references, we can consider having better message delivery for invalid / unsupported emails by using better vocab or with toasts