---
title: "In a definitions file, how to define a long property with a minimum value constraint"
url: "https://academy.jahia.com/sites/academy/contents/knowledge-base/2025/in-a-definitions-file-how-to-define-a-long-property-with-a-minim.html"
last_updated: 2026-10-01
---

# In a definitions file, how to define a long property with a minimum value constraint

Developer System administrator Jahia 8.2

## Question

In a definitions file (CND file), how do I define a long property with a minimum value constraint?

Can you give me also an example with a range constraint?

## Answer

The information to create a new content type can be found in [this documentation](https://academy.jahia.com/documentation/jahia-cms/jahia-8.2/developer/creating-and-managing-content-types/creating-content-types-for-editors/creating-a-content-type).

More detailed information about the Compact Namespace and Node Type Definition (CND) can be found in [the Apache Jackrabbit documentation](https://jackrabbit.apache.org/jcr/node-type-notation.html).

When modifying a definition, please also follow carefully the advice provided in this documentation:

1. [Modifying existing content definitions](https://academy.jahia.com/documentation/jahia-cms/jahia-8.2/developer/creating-and-managing-content-types/managing-definitions/modifying-existing-content-definitions)
2. [Migrating and modifying nodetypes](https://academy.jahia.com/documentation/jahia-cms/jahia-8.2/developer/creating-and-managing-content-types/managing-definitions/migrating-and-modifying-nodetypes)

If you want to set up a range or a minimum value constraint, you'll have to set up a custom validator. An example can be found [there](https://academy.jahia.com/how-to-create-a-constraint-for-image-size-upload).
