Added frontend validation