feat: Add validation for human verification slider sum in CreateProfile form

This commit is contained in:
Prad Nukala (aider)
2024-12-09 17:36:09 -05:00
parent 0e8b92e53d
commit ce3d073abd
2 changed files with 56 additions and 1 deletions
+10
View File
@@ -24,6 +24,16 @@ func HandleRegisterView(c echo.Context) error {
}
func HandleRegisterStart(c echo.Context) error {
// Validate the form submission
formData := make(map[string][]string)
for key, values := range c.Request().Form {
formData[key] = values
}
if err := forms.ValidateCreateProfileForm(formData); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
}
challenge, _ := protocol.CreateChallenge()
handle := c.FormValue("handle")
firstName := c.FormValue("first_name")