Call onStateChange if available when validate/setData/updateData are called.

This cuts another common manual step off regular usage.