Got the solution. Need to override NSControlTextEditingDelegate method with the following:
- (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error
{
NSBeginAlertSheet(@"OK", @"Cancel", nil,nil, <NSPanel instance>, self, nil, nil,nil, @"Error");
}
:) :)