Announcement

Collapse
No announcement yet.

Validate input

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validate input

    How do i validate for example a textfield before save like the int field min and max? I want to assure that for example a textfield contains some values. Is it possible to do for example regex and deny save, if it does not caontains approved values.

    Or it is possible with hooks to do the same before save on some fields?
    Last edited by patsonson; 03-20-2017, 04:03 PM.

  • #2
    Hi
    override the view of field in entityDefs
    override validate function

    an example of custom view creation - https://github.com/espocrm/documenta...ustom-views.md

    as example you can get entity Account field shipping address (
    application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json - fields - "shippingAddress"
    /client/modules/crm/src/views/account/fields/shipping-address.js
    )

    Comment


    • patsonson
      patsonson commented
      Editing a comment
      Thank you i will try that. Is it any logic behind where to put "custom"-folders? Tried to figure that out for a while.

      (I don't see any pattern in where "custom"-folders are. For example custom/Espo/Custom/ in the example above. And in other examples it's in different places.)
Working...
X