Improved JS pin validation (864703, 865661)