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
Python’s leaky TestCase
I’ve been trying to find out why our Django unit tests were exhausting the memory on our development machine causing the OS to terminate our CI builds. Memory leaks are not normally associated with garbage collected languages such as Python so this was a curious problem. Continue reading
New feedback tool ‘Duat’ released
Duat is a simple, lightweight user acceptance tool written in Django.
It requires minimal integration with the target website – only requiring a single script tag inserted at the end of the page. It’s intended to be used to allow site visitors to report problems and issues that they come across such as:
- Highlighting CSS issues
- Reporting spelling mistakes
- Submitting bug reports
I developed duat primarily for use with our BOS2 tool and modelled it after Google’s feedback mechanism. Continue reading
Re-enabling Password Pasting on Annoying Web Forms (v2)
Security is not to be taken lightly so in recent days I’ve become increasingly frustrated by the insistance of some companies to disable the facility to paste passwords into login forms. Rather then increase security, this cripples those of us using password managers such as KeePass or 1Password, as the nice long randomly-generated passwords cannot be simply pasted into the password field. Instead users are forced to manually type in passwords which will promote the use of shorter passwords (and thereby weaken security). Continue reading