+
+
Name
+
+ {errors.fullName && (
+
+ {errors.fullName.message}
+
+ )}
+
+
+
+
+ Email Address
+
+
+ {errors.email && (
+
+ {errors.email.message}
+
+ )}
+
+
+
+
+ Password
+
+
{
+ if (password.length < 8) {
+ return "Password must be at least 8 characters long";
+ }
+ if (!password.match(/[a-zA-Z]+/gi)) {
+ return "Password must contain characters";
+ }
+ if (password.split("").every((c) => c.toLowerCase() == c)) {
+ return "Password should contain at least 1 uppercase character";
+ }
+ if (!password.match(/\d+/gi)) {
+ return "Password should contain at least 1 digit";
+ }
+ },
+ })}
+ className="dark:text-gray-100 border border-gray-300 dark:border-gray-700 rounded placeholder:text-gray-600 text-sm p-2 focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+ {errors.password && (
+
+ {errors.password.message}
+
+ )}
+
+
+
+
+ Repeat Password
+
+
{
+ if (repeatPassword != password) {
+ return "Password does not match";
+ }
+ },
+ })}
+ className="dark:text-gray-100 border border-gray-300 dark:border-gray-700 rounded placeholder:text-gray-600 text-sm p-2 focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+ {errors.repeatPassword && (
+
+ {errors.repeatPassword.message}
+
+ )}
+
+