I'll provide my solution, even though this is an old post, since it's a top Google result.
As far as I know, you cannot disable the OK button, but there is a way to prevent users from moving forward if they don't meet your validation test.
When you click OK on the widget settings page, the getConfig() method is fired. If we return false on this method, the user will not be able to close the settings page. Therefore, we can add a validation method and return false if some criteria is not met - with a popup indicating what the user omitted.
getConfig: function() {
if ( !this.yourValidationMethod ) {
return false
}
},
yourValidationMethod: function() {
if (lang.trim(this.someInput.get('value')) === '') {
return false;
} else {
return true
}
}