Improving jQuery performance on element-heavy pages

I’ve been working on the client-side validation for our new BOS2 survey service. We need to validate all form fields on the page both as the user interacts with each field, but also before page submission. On the server-side we also do a full validation check, but if we can do all this validation locally this will provide a more responsive experience for the user as well as stop invalid submissions which will help reduce the load on the server. Continue reading

Validating email addresses in Python and Javascript

On the BOS2 project we have added email address validation to our survey input fields. To achieve this we initially used Django’s EmailValidator but it has some limitations – noticeably it does not impose a length restriction on the local part of the email address (before the ‘@’ symbol), and it also requires a dot (.) in the domain part (so example@com fails to register as valid when it should). Continue reading