Add validation argument to fromJSON