Used regex from jquery.validation.js, as the old one isn't reliable. Added 'required_if' method, which checks if both fields are filled or empty