Revised and fixed frontend validation