how do i get my users to not

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamie
    Senior Member
    • Aug 2025
    • 273

    #1

    how do i get my users to not

    My users seem to love using the Name field as a blurb/description, and the Description field as either a super long essay or just a copy of the Name 😳.

    As you can imagine, this wreaks absolute havoc on display 😬. Sometimes the Name is 20 characters, sometimes 255… total chaos!

    Since this is within Sales Pack, I can’t just make the field smaller, but maybe that’s something to consider ?

    I know this is mostly my headache 🤯, but I thought I’d share in case anyone else has users who just won’t input data properly .

    And don’t even get me started on when they realized they could dump an entire address into the Street field … it’s a free-for-all!

    And the real victim? My nice formatting and stats dashboards !!!

    I guess I’ll have to dive deeper into validation, because clearly my users will never learn .
    Last edited by yuri; Today, 01:18 PM.
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9765

    #2
    The max length for most Varchar fields can be edited via the Entity Manager. Only for some entity types and fields the parameter is restricted.

    Validation with an API Before-Save script can also help. For example, throwing an error if there are more than 4 white spaces in the name.

    Comment


    • jamie
      jamie commented
      Editing a comment
      I am hesitant to make such changes on tables controlled by extensions such as sales pack

      Yes, the validation api is probably the best way. Any tutorial you recommend? i am particularly keen to do most of the validation from PHP

      User input is the most unstable thing in my whole system!
      Last edited by jamie; Today, 08:25 AM.
  • rabii
    Active Community Member
    • Jun 2016
    • 1390

    #3
    Originally posted by jamie
    My users seem to love using the Name field as a blurb/description, and the Description field as either a super long essay or just a copy of the Name 😳.

    As you can imagine, this wreaks absolute havoc on display 😬. Sometimes the Name is 20 characters, sometimes 255… total chaos!

    Since this is within Sales Pack, I can’t just make the field smaller, but maybe that’s something to consider yuri ? 🤔

    I know this is mostly my headache 🤯, but I thought I’d share in case anyone else has users who just won’t input data properly 🤦‍♂️.

    And don’t even get me started on when they realized they could dump an entire address into the Street field 🏠💣… it’s a free-for-all! 😂

    And the real victim? My nice formatting and stats dashboards 💔!!!

    I guess I’ll have to dive deeper into validation, because clearly my users will never learn 😅.
    you can try something as below using api before save formula

    PHP Code:
    if (string\length(name) > 20) {
        
    recordService\throwBadRequest("`name` is too long — maximum allowed is 20 characters.");

    Rabii
    EspoCRM Custom Development

    🔗 Portfolio & Builds

    Comment

    Working...