kollemate / kolledata

[project=dead, sry] minimal crm system powered by node, express and mysql
Other
7 stars 0 forks source link

Validations for url and email #58

Open kiliankoe opened 10 years ago

kiliankoe commented 10 years ago

Currently url and email are checked by validator.js before allowing the form to be submitted by disabling the submit button when a value doesn't pass. If both are wrong, and one gets fixed, the button is activated again.

While we're at it: Validations are no longer working on the edit pages, due to the fact that the id has changed and there are more email fields.

kiliankoe commented 10 years ago

Unfortunately doesn't seem to work with Safari. Chrome handles this fine.

kiliankoe commented 10 years ago

The two alternative options are to validate this like I tried before in the frontend (anyone using noscript can also bypass this) or doing backend validations.

Whilst backend validations do make sense in the long run, this is still a tool for use by the people managing their own database, not the public, so fucking it up and filling it with stupid data would be their fault and problem. I tagged this as longterm for now, the current solution by Lucas via HTML5 validations is cleaner than what I tried before and most browsers support them.

(And this is only for pretty emails and URLs anyway... So.... Yeah.)