I have a text input that is being inserted into the page via an HTML field (so I don’t have access to the
validator_calc option.) I do still have a custom validation that I would like to execute
onblur for this text input.
Is there a BF-supported way to validate a HTML text input locally? I was hoping there would be a more localized way of handling the validation than having to create a namedAction and attaching that to the element.
You can apply a validator calc on an html field as well. It’s best used when the HTML field is isolated and only contains the single input, so that the error message displays in the desired spot.
The HTML field will be iterating through a given list of names (and each name is rendered as a pre-filled text input) and those would be the only inputs in the field.
So on the one hand, I think your solution would work since the HTML field is focused solely on this one category of inputs. But would the fact that it is technically more than one input mean having a
validator_calc on the HTML field wouldn’t work?
validator_calc would still work, and your validation calculation can be more generalized and cover the multiple input fields. The only downside to this is that you can’t get that default red error message to pop up underneath every individual input field, it will just be one at the bottom.
I think that should still be workable. Thank you! I’ll explore this option.