I am doing validation for my Youtube url text field.
I need to check, if the Youtube url does not exist I should throw error, I followed this answer an
Youtube
somebody already had the same problem as you, you cannot check for a 404 error when doing cross-domain requests. You should handle it via a timeout.
JSONP request error handling