Hi guys, I’ve made a script to give us validations to limited set of fields. It runs as an app and ask input for the table for which you provide validations.
Check out this Validate Inputs Base and let me know if you have any doubts.
Process is really simple, just create your normal table and another table with name tableName-Val having 3 Text Fields: Column, Regex, Remark.
Enter those coloumn names under Column and their respective validation regex and remark. Try inputting data via app and it will only add data which is valid and keep on asking new data if its invalid.
Let me know if there’s something I can improve it into.
Run the app and select table where you need to add validate data using your custom validations.
Currently these fields can have validations because they can be entered via a text box inside scripting app while other fields cannot be:
- Single Line Text
- Phone Number
- Date Time
(the regex inside Validate Inputs base aren’t perfect, please use your custom regex for accurate validations)
So a table having not-supported validation columns like Single Select or Attachments or Multiple Select will be ignored and skipped by the script and rest of the fields will be asked to be entered.
Here’s the script link which will be updated as any improvement comes up:
Copy above code to the Scripting Dashboard in the Validate Inputs Base, activate Scripting App and replace all the code with above code.
This is currently very limited use case of entering data manually to the table case, there are other use cases like forms but that has to be implemented by airtable side, there’s one use case imports on which it can be modified into and taking two CSV files one of data and one of validations and import only valid values and rest into another table as rejected values. If the second use case is required or useful, I’ll make that one too, or any other use case which I am unknown to, contact me I’ll come up with something for sure.