Renaming validate-fn to validate