Creating a more optomized version for submit validation