Improved data validity checking behaviour for enabling and disabling apply button