Controlling required field constraints

Options
Hi there,

Trying out Xano with Bubble by creating a simple Invoicing tool just for fun and learning experiences.

Goal is to not store any data in Bubble.

Process is as follows:
- Button Add Invoice > Post create invoice (container) in state: initial witch only an invoice number.
- fill In additional invoice info 
- Add Invoice line and after submit Post Invoice line to Camp and save invoice line and link to invoice
- Save invoice, PUT all additional information to Xano. Update state to complete

Upon Save I would be able to besides having the front-end checking on required fields, I can do the same at backend side in Xano?

Is it possible to define and check upon required fields in Xano?

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    Sure. Xano has some nice built-in validators in the inputs section - check out the filters in particular. For additional validation logic, use the function stack to perform additional tests, and apply a "precondition" utility function to bounce back with an error code when it's not quite right. 

    The endpoints come with a single query statement in the function stack by default. But that's neither required nor best practice - use the function stack to apply logic that makes sense for your use case!
  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options
    Hey there! You can definitely do that in Xano. You can either specify filters in your database in Xano, or on the inputs / in the function stack of your endpoint!