“Stray start tag footer” in html validator?

You need to move the </body> end tag at the very end, because a footer element must not appear after the body element but inside it. This follows from the syntax of the root element, the html element: it contains a head element and a body element, nothing more. The validator says “Stray start tag footer” because the start tag appears in a context where no elements … Read more

XAML Binding Groups

Try specifying you binding group as DataGrid.ItemBindingGroup instead of DataGrid.BindingGroup: And in this case you actually can omit specifying the name for your binding group. It will automatically be used for all bindings in a row.

How to validate an email address in JavaScript

Using regular expressions is probably the best way. You can see a bunch of tests here (taken from chromium) Here’s the example of regular expresion that accepts unicode: But keep in mind that one should not rely only upon JavaScript validation. JavaScript can easily be disabled. This should be validated on the server side as well. Here’s an example of … Read more

How can I validate an email address using a regular expression?

The fully RFC 822 compliant regex is inefficient and obscure because of its length. Fortunately, RFC 822 was superseded twice and the current specification for email addresses is RFC 5322. RFC 5322 leads to a regex that can be understood if studied for a few minutes and is efficient enough for actual use. One RFC 5322 compliant regex … Read more

Good input validation loop using cin – C++

I’m not a huge fan of turning on exceptions for iostreams. I/O errors aren’t exceptional enough, in that errors are often very likely. I prefer only to use exceptions for less frequent error conditions. The code isn’t bad, but skipping 80 characters is a bit arbitrary, and the error variable isn’t necessary if you fiddle … Read more

How can I validate an email address using a regular expression?

The fully RFC 822 compliant regex is inefficient and obscure because of its length. Fortunately, RFC 822 was superseded twice and the current specification for email addresses is RFC 5322. RFC 5322 leads to a regex that can be understood if studied for a few minutes and is efficient enough for actual use. One RFC … Read more