Adding MySQL validation