>> 1. The value in loc:invalid should indicate to which field the focus must return, but it does not. Should it?
Validation is done in the ValidateValue::FieldName routine.
If validation fails, you should set
loc:Invalid = 'Fieldname'
FieldName:IsInvalid = true
loc:alert = 'some message'
This routine is called when the field completes (if auto-validation for the field is on) and when the user clicks on Save.
>> 2. Now because focus is not set to the error field, I have to repeat the validation on the save button.
Validation is always repeated when the Save button is pressed. The data from the browser is untrustworthy. When the Save button is pressed a disk-write is about to be made, so the same ValidateValue routine is called.
cheers
Bruce