You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use Hypertag with Htmx (htmx.org) and I've bump into a problem with validation like here (https://htmx.org/docs/#validation):
<formhx-post="/test"><input_="on htmx:validation:validate if my.value != 'foo' call me.setCustomValidity('Please enter the value foo') else call me.setCustomValidity('')"
name="example"></form>
I've tried to use backslash:
formhx-post="/test"input_="on htmx:validation:validate \ if my.value != 'foo' \ call me.setCustomValidity('Please enter the value foo') \ else \ call me.setCustomValidity('')"name="example"
but it gives me an error SyntaxErrorEx: invalid syntax near line 2: input _= "on ht...
It has to be multi-line, so raw string is not an option. Any suggestions appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to use Hypertag with Htmx (htmx.org) and I've bump into a problem with validation like here (https://htmx.org/docs/#validation):
I've tried to use backslash:
but it gives me an error
SyntaxErrorEx: invalid syntax near line 2: input _= "on ht...
It has to be multi-line, so raw string is not an option. Any suggestions appreciated.
Thanks for any help and great job on Hypertag.
Beta Was this translation helpful? Give feedback.
All reactions