Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do validations only allow true or false
#2
I had a quick look which escalated into a little over half an hour to implement this change

https://github.com/tsolucio/corebos/commit/4b942d0b3686b8f20e9d2567bb5251dd653bcbe0

that permits us to use the same functionality we have in the custom file validations, where you can return CONFIRM and FUNCTION


Code:
<map>

  <originmodule>
    <originname>Accounts</originname>
  </originmodule>
  <fields>
    <field>
      <fieldname>accountname</fieldname>
      <validations>
        <validation>
          <rule>contains</rule>
          <restrictions>
          <restriction>mex</restriction>
          </restrictions>
<message>%%%FUNCTION%%%yourfunction%%%PARAMS%%%{field},lbl</message>
        </validation>
      </validations>
    </field>
  </fields>
</map>

your custom function has to have this profile:

(edit_type, formName, action, callback, params)

I see that FUNCTION is not documented here:

https://corebos.com/documentation/doku.php?id=en:devel:corebos_validation

it should be
Joe
TSolucio
Reply


Messages In This Thread
RE: Do validations only allow true or false - joebordes - 08-07-2020, 01:32 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)