phoenixframework / phoenix_live_view

Rich, real-time user experiences with server-rendered HTML
https://hex.pm/packages/phoenix_live_view
MIT License
6k stars 906 forks source link

Warn if using `<input name="id">` #3269

Closed SteffenDE closed 1 month ago

SteffenDE commented 1 month ago

This only works when writing <input name="id"> directly, as it's a compile time check only. If the name is in an assign, it won't warn because we don't know the value of the assign until runtime (correct me if I'm wrong).

Maybe we should add a warning in the LiveView JS, like the duplicate ID warning.

image

@josevalim

SteffenDE commented 1 month ago

(no tests yet)