Validating TextBox

I saw Meredydd’s post about the form validation library and I thought I would put my version of client side validation.

https://anvil.works/ide#clone:FQSR676ZHIJ5V6AQ=7DEIXSNWFXUVLC7DJHWJGPCX

My approach is different and I would say more Anvillista: I use a custom component instead of a library and set the validation and format properties in the component properties instead of in the code. The component manages data binding and (a few) events.

It is not polished yet, but I have already used it in a few apps and I’m happy about it.

Unfortunately it looks ugly in the IDE because the label and other properties are not visible in the form in deign mode. But I hear the Anvil team is planning to improve this aspect of custom component usability in the more or less near future.

2 Likes