Add validation to valid.swift