FEATURE ANNOUNCE: Input Validation for Entity Name Fields

ShotGrid has released new Input Validation capabilities for system created Entity Name Fields (e.g. Shot Code, Sequence Name, Asset Name, and etc.). This workflow allows users to configure validation rules i.e. define specific input requirements that need to be met in order for the data to be accepted into ShotGrid. Once a validation rule is created, it can be applied to the desired projects on a site.

Check out our blog post on AREA for more information

5 Likes

Hi,
seeing field validation is a great addition, even though we have our internal validation happening on an Event Listener.
But it would not hurt to warn users upfront instead of having the Event Listener nagging a few seconds later.
While I was testing the validation it confused me very much that (it seems) I can define those rules only per project, and even more confusing canā€™t set them up on a template project (so they will be picked up automatically for newer projects).
As most studios have rules and naming conventions for all projects, I guess this must be something of great interest.
Could it be that I just overlooked something?
How can I define validation rules for all (future) projects?
Thanks,
Tobi

1 Like

Hi @pixelconductor, thanks for your interest in the new Input Validation feature! To answer your question, there isnā€™t a way to add validation rules for all (future) projects. You can apply an existing validation rule to a new project by launching the Configure Field dialog from a page where the rule is enabled. Then navigate to the Validation tab in the dialog and add additional projects by following these steps.

We are continuing to collect feedback for potential future improvements on Input Validation, and have taken note of this request. For us to better understand your requirements, may I ask how many projects you are creating and how many validation rules you are trying to apply to these projects?

Thanks again,
Xin

Hi Xin,
thank you for your response!
We are creating about a project per month. Going through all neccesary validations and re-applying them to a new project would be cumbersome, prone to errors and might be forgotten on a regular basis.
Being able to apply the rules via the API would kind of solve the problem as we would let the Event Listener take care of the rules then.

I actually donā€™t see a single validation rule usecase (for us) which I want to apply that should not be globally working. In general its about covering naming conventions to make sure that downstream pipeline tools will work, or field formattings (check if its a valid email).
Both of theses things are very much global defauls for me.
Your validation rule options are powerful enough to make these things globally working for me, even though I would have liked regex support to show up.

Consider this a feature request to either create global rules or at least to be able to apply them to template projects.

Best,
Tobi

Thanks for the the additional information Tobi!

Is there any way to specify a space as a special-character, to use as a separator?

For example to enforce a space-separated RGB hex value like ā€œA1 B2 C3ā€.

1 Like

Hi @taiello,

Thanks for your question.

Currently we do not support space characters in the special character list for input validation rules. We have added this to our list of requests for consideration in future enhancements.

Stefan

1 Like

@slewery Iā€™d like to add to @taiello 's request that this would be a useful addition. Weā€™re trying to validate a Description field and spaces are to be expected in its contents. I see no reason why the space character shouldnā€™t be an option for someone to use. Iā€™d personally like to see the new-line or carriage-return character available as well - more options gives the existing validation system more utility and less need for users to build solutions circumventing its limitations.

Thanks for adding your weight behind this @scl-mschroeder!

Weā€™ve created a ticket for the ā€˜spaceā€™ special character and weā€™ll also look into the carriage return idea. I canā€™t commit to when this work will be done, but our team is looking at it and Iā€™ll lat you know when itā€™s available.

1 Like

Appreciate the response @warren.trezevant - Iā€™ll keep my eyes peeled for whenever that may be! Validations are super handy for a large number of things already, so hopefully this will just add to the list of useful stuff you can do with it.

This input validation looks super helpful @warren.trezevant, I have few queries around the same.

  1. Validation tab is not available in configure field window.
  2. How can I restrict user from adding same entity multiple times in a ā€œmulti entity fieldā€?
    Thanks for your anticipationā€¦!!

Hi scl-mschroeder

Thanks for your suggestion. We have added space character support to our list of upcoming enhancements and will take a look at whether we can include newlines with this.

Stefan

1 Like

Hi KamalS

Thanks for your questions!.

Validation should be available in the configure field window. Please note, that you wonā€™t see the tab displayed for demo or template projects or when viewing a project based entity in a global (non-project) context. Validation is currently supported for text, currency percentage, float and number types.

We donā€™t currently support validation for mult-entity fields but we will add this to the list of features for consideration.

Stefan

1 Like

Hi,

Would it be possible to add validation for linked entity code for example, make sure a shot code contains the sequence code ?

Thank you,

Louise

How can we check for the validation rules within our REST/python API calls? When doing the schema_field_read command in python on the entity field where the rules are set, Iā€™m not seeing an entry with the specified rules, just whether or not itā€™s editable, unique etc. Is there a different command that is used for this?

Thanks!

Hi @blavin,

Thanks for your question! We currently donā€™t support returning the validation rule with schema fetch calls in our apis. We are currently working on improving the experience of using validation with the APIs and I have added your request to our items for consideration for future releases.

Regards,

Stefan

My apologies,

You should actually currently be able to retrieve some information on the rule with your schema call.
eg.
{{host}}/api/v1/schema/Shot/fields/code?project_id=<project_id>.

Will return a block indicating the message, description, enforcement type and rule type.

eg

        "validation_rule": {
            "strict": true,
            "enabled": true,
            "format": "",
            "display_message": "",
            "description": "",
            "rule_type": "text"
        }

Thanks for the info Stefan, I was under the impression based on this that it was supported:

But, Iā€™ll keep an eye out for any further updates, thank you!

Wanted to let everyone in the channel know the ShotGrid team recently added the ability to use spaces when setting up Input Validation rules.

To learn more about this enhancement, be sure to check out our updated documentation here

Weā€™re excited to continue offering value to this important feature and would like to hear from you any feedback you have on how youā€™re benefitting from Input Validation or what else we could add to help you utilize it more effectively at your studio.

1 Like

Hi Warren,

I just started to use a validation rule. In our case, we want to prevent the use of underscores in shot and asset names. I managed to make the rule but I would like to enable it on future projects. When we create a project we use a ā€˜template projectā€™ as a template. Opened that ā€˜template projectā€™ and tried to apply the validation rule (or rebuild it there), but when I right-click a field in that project and go to the configuration page for that field, the ā€˜VALIDATIONā€™ tab doesnā€™t show up.

How should I proceed to ensure future projects will inherit my validation rule ?

Thanks

1 Like

Thanks for your feedback @donat .

The good news is our team is currently working on providing the ability to include validation rules in templates and weā€™re hoping to make it available sometime in the New Year. As soon as itā€™s ready, Iā€™ll be sure to let you know so you can validate the workflow with your team.

Have a wonderful holiday break and Iā€™ll reach out again soon.

Warren

1 Like