Interpolate from the contours a number of points with known elevation and see the differences. If the RMS of such differences is within the accuracy specificatiob limits you are ok. You can obtain points with known elevation either from existing maps or by field measurements. In case you use GPS in the field make sure that the elevations you get are orthometric (above geoid) and not geodetic (above ellipsoid).
Yes, the best way of verification is just to add base map (eg. OpenStreetMap or TopoMap) and show labels of these contour lines (in ArcMap function "Label Features") (in QGIS in Properties "Labels"). Good luck!
These are all great suggestions. The best route probably depends on how quantitative you need to be in your check. If you want to spot check a few values, just load all of your data into a GIS and compare the contour line value with the elevation cell value.
Alternatively, you could use John's approach and create a series of 'check points' (lines or points) that run across the elevation gradient. In the GIS, extract two values to each point, one from the contour line and one from the cell. Ideally you would have a high number of points (> 100). Then run a statistical test (e.g. Pearson's correlation coefficient or even a regression) on the two sets of values to see how closely they are correlated. This will give you a quantitative metric that you can report as part of your analysis.
In addition to ArcGIS and QGIS, you can do the entire analysis in R.
Otherwise, you can convert your polyline into points in one layer and overlay with an another layer contening , x,y, z data. After you can use an interpolation with the DEM layer, like IDW to know what is the z value nearest each point of your polylines layer, by superposition..
If you want to check the wrong height value assignment to the contour line, you can set the colorramp symbols for the contour lines. Then you should see the wrong ones.
I did this manually, based on the values of the elevation attribute for a small subset of my data.
However, I am looking for a more automatic approach since I have to check for a large amount of data. I'll try to extract points from the contour lines and compare with points from the cells, like suggested.
I suggested that better go for classification of contours with help of height and differentiate with various colours shades. In this case you can able to identify the incorrect or wrong contour/s quickly. For example, if the contour values are ranging from 1000 to 3000m height then go for the classification of 100m interval. If, you find any wrong value/s change it in the attribute table. All the best
Normally, wrong values in contour lines occur at a specific contour, and you can easily find them with colors.
In the simbology properties, you can classify the contours lines (from the "Z" value) to vary between green and red, for exemple to find big mistakes. Also, if you have a high height amplitude, you can do that in "height intervals" (first, x - x1; than, x1 - x2;...).
However, correct this errors is difficult. If you find a missing contour or an adittional contour (two contours wrongly with the same Z), you can correct "semi-automatically" using the attribute table: create a new column and, to the contour lines upstream (selected), apply "Z column +equidistance" (if there is a missing contour) or "Z-equitistance" (if there is a additional contour). Replace the value of the cells for the upstream contours.
In ArcGIS: If z value is not included in attribute table of contours, use the tool "Add z value" first. Then construct points over the contours (distance and density is up to you). Use digital elevation model of your locality and extract values from DEM to points... z values of contours and z values of DEM will be in the same table for comparison, good luck
Create a TIN with the contour lines and view the TIN with the default color palette using many classes. Any discontinuity of contour elevations will show up.