The town, which has the oldest town charter in Wales, dating from 1284, is known for Flint Castle , begun by Edward I of England in 1277.