added docs for onBeforeValidation for valid