I think the main concern for frontend validation was before HTML5 came along with validation attributes. You can easily produce HTML input validation attributes from a Yup schema for example by using its serialization feature (https://github.com/jquense/yup#schemadescribeoptions-resolve...).
Here is an example from some silly code I wrote a while back testing htmx with deno
https://github.com/dsego/ssr-playground/