Custom Validation

Can someone help me out here please as I’m getting unexpected behaviour on some custom validations I’m doing on a form before I save the contents. Essentially, I have 2 validations taking place: the first is a standard one to make sure the title field contains some text which I’m achieving using the Required field setting. The second validation is a custom validation involving two fields, League and Team, and is only valid for certain combinations. The validations all seem to work OK, but when I come into the save routine, I first check the fields validity and now unexpectedly, the title validity object is showing not valid, and of course, I’m getting the wrong error message displayed. The screen looks like:


the custom validation code is:


and the save button code starts with:

Basically, why is the validity object for the #inpTitle being changed from Ok to fail?

Excuse the code verbosity, but I wont refactor the code until I’m happy with the logic.