Geting error while connceting the worldflow with button

.
how to vaildate input field when the user trying to hit the button without entering any details in input.
i already gave the workflow for error message but that isn’t working in a correct way.if user number is vaild then only it will move to next page otherwise it should show some error message.how to do that?

Hi there!
You can create a JsObject that contains your validation code, then set this JsObject to run onClick of the button.

Here’s a guide that elaborates more on how to use JsObjects - How to Use JS Object Within Appsmith? | Appsmith

Hi olawale,
can’t we execute the api calls and vaild that in query without writing js object code ?
how to calculate api call in and out time and can’t we upload an image from local storge radher than url.

Hi @shivam.agrawal, while you can call the APIs directly without the need for a JsObject, you will need to write the rest of the code for validation in a JsObject.