How do you define validators for Input fields? I s...
# compose-web
k
How do you define validators for Input fields? I see that there is an onInvalid method, but I can't seem to figure out how to set validity
I solved it by using the inbuilt min/max/required/pattern functions. What I can not figure out though is how to set a custom error message. What I am looking for is something like setCustomValidity, but I can't figure out how to access it from an Input composable
Figured it out
Copy code
prop({ element: HTMLInputElement, msg: String -> element.setCustomValidity(msg) }, "Some custom message")