[openstreetmap/openstreetmap-website] Require password on signup form submit (PR #6831)

Stillhart notifications at github.com
Fri Feb 20 23:01:12 UTC 2026


### Description

Currently the `email` and the `display_name` have the basic html attribute `required="required"` which forces the users to enter something before submitting the form. It prevents them from submitting empty fields.

The `required="required"` is missing for both `password` and `password confirmation` fields, so I added it.

This change skips bootstrap and backend validations and uses the browsers builtin (limited) capabilities.
The user can still enter a too short password.

In case only rails validations after submit are desired, we might consider removing the `required="required"` attribute for the email and password.

Slightly related, html has `pattern` that can be used for client side validations, but the error messages are less helpful.

### How has this been tested?

I ran the existing testsuite and testing it myself in the browser.

### Related

Should there be more client side validations avoiding the blind submit and then fail? I may help with that.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6831

-- Commit Summary --

  * add copilot instructions
  * Merge branch 'master' of https://github.com/openstreetmap/openstreetmap-website
  * require password on user sign up, same as email and username
  * run linter

-- File Changes --

    A .github/copilot-instructions.md (110)
    M app/views/users/new.html.erb (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6831.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6831.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6831
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6831 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260220/63422db8/attachment-0001.htm>


More information about the rails-dev mailing list