6 ms·
Formly: the form glamorizer for jQuery
- mixmax 15y agoThe e-mail regex needs some work - sdfg+sdf@sdff.de, which is a valid e-mail address, doesn't validate to true.
- constant_change 15y agoSometimes it's best just not to bother with a regular expression. Email addresses are a prime example of where this is true.
- gmac 15y agoThis has been discussed to death all over the place, but I think the take home is not to be too clever rather than not to use regexes. I tend to look for 'something at something dot something': .+@.+\..+ I believe this allows all valid addresses (as well as lots of invalid ones, obviously). But I'm sure someone will let us know if not. :)
- mquander 15y agoObvious counterexample: me@localhost. (Not that this is a useful counterexample in the context of a form submission.)
- ifzen 15y agoIf you REALLY need to validate en email address: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html but again, only if you REALLY, REALLY , REALLY want to.
- pspeter3 15y agoThat's ridiculous and awesome. I'm glad regular expressions exist so we can make garbage/magic like that
- pavel_lishin 15y agoFor a second, I thought it was a perl script.
- lpolovets 15y agohttp://fightingforalostcause.net/misc/2006/compare-email-regex.php http://fightingforalostcause.net/misc/2006/compare-email-reg... is a good site that has a number of email regex variants and how well they do on various email address formats.
- freddier 15y agoShouldn't the placeholder text use the standard "placeholder" attribute of HTML5 instead of the "place" I'm seeing in the examples?
- rimantas 15y agoDear fellow developers, forget that type="reset" exists.
- RyanMcGreal 15y agoNitpick: clicking on the text related to a checkbox or radio button should activate that form element (via the `label` element).
- MartinCron 15y agoThat's not a nitpick, that's a big fucking deal.
- kevinholesh 15y agoI don't think filling in a form online will ever be glamorous. The thing I strive for when designing a form is that it is usable by anyone and instantly recognizable as a form. This is a great plugin, but consider the consequences of using non-browser-default form elements and the potential to confuse your less technical customers.
- pasbesoin 15y agoOT: What's with the recent prevalence of ginormous favicons? (In this case, 300 x 300?) Is there a context where the large size is a benefit? (Tablets?)
- pavel_lishin 15y agoI believe that when you bookmark something to an iOS device's desktop, the favicon is the default application icon, so it makes sense to make it big and fancy in that context.
- rdoherty 15y agoPlease please don't put labels inside text fields. Once you've entered information you don't know which field it is, especially after you've filled out the entire form.
- BerislavLopac 15y agoTitle attribute, or a custom tooltip, resolves that.