assert( isValidMimeTypeName("text/plain")); assert( isValidMimeTypeName("text/plain2")); assert( isValidMimeTypeName("text/vnd.type")); assert( isValidMimeTypeName("x-scheme-handler/http")); assert(!isValidMimeTypeName("not mime type")); assert(!isValidMimeTypeName("not()/valid")); assert(!isValidMimeTypeName("not/valid{}")); assert(!isValidMimeTypeName("text/")); assert(!isValidMimeTypeName("/plain")); assert(!isValidMimeTypeName("/"));
Check if name is valid MIME type name.