wip: writing shared validation logic