Custom Validation function reference phone book icon

  • 13 September 2014
  • 4 replies
  • 5 views

Badge +3

In the Control Settings for a field, under the validation section, there is a 'Custom validation function' field.  This field has an address book icon on the far right that opens the 'Insert Reference' pop-up.  What's confusing about all of this, is none of the References in the Common, Item Properties or Inline Functions tab actually work in this field.  This field only seems to be able to call custom javascript functions on the server, or custom javascript functions from the custom JavaScript section of the form settings.

 

If this is the intended behavior for this field (i.e. not a bug), could you rename this field to 'Custom JavaScript validation function' and remove the address book insert reference icon from the right of the field?  We've already had a couple of people try to create custom validation in this field instead of using a rule because it looks like you should be able to.  I think these two changes would make it more obvious that this is not what this field is intended for.

 

Thanks.


4 replies

Userlevel 7
Badge +17

The Custom Validation Function text box intention is to provide the designer a means to specify a JavaScript function name for the client side custom validation. And that function should either be in the forms settings Custom JavaScript section or in an included JavaScript file. So it isn't a bug.

 

I can see your confusion by glancing at the label of the field, but there is a tooltip when you click on the box next to it to describe the feature. As seen here.

nintexcustomval.PNG

Also the Help documentation by clicking on the help button in the screen shot provides further information to assist designers.

_________

Use custom validation: Enables the value entered into the control to be validated by a JavaScript function.

 

If Yes is selected:

 

Custom validation function: Specify the JavaScript function name for the client side custom validation. Note: The JavaScript function is to be specified in the Custom JavaScript section within the form's Settings.

 

E.g. The property should be ClientValidate when the following function is added to the custom JavaScript in the form.

 

function ClientValidate(source, arguments)

{

      if (arguments.Value % 2 == 0){

        arguments.IsValid = true;

      } else {

        arguments.IsValid = false;

      }

}

_________

The insert reference book icon next to the input box is extremely helpful when using the custom validation so you can provide Common, Item Property, or an inline function assisted value as a parameter to the JavaScript function doing the validation.

 

You are correct, the label alone may not be exactly clear, but hopefully the available help information built into the product can assist in the gaps.

Badge +3

So you agree that the label should be changed correct?  My problem is we have over 100 site owners who we are trying to train an support on how to use Nintex Forms.  This was an issue brought to us by one by a couple of these users who thought they had setup a validation function and couldn't figure out why it didn't work.  I don't think the majority of people are going to hover over the field and read the description.

Also the Help icon is not very useful.  If you click on the help icon and search for 'custom validation function' which is the name of the field, you get back 0 results.

Userlevel 7
Badge +17

IMHO, no the label should not be changed. As custom to me means outside of normal operations. Since there 4 normal operations to validations (Compare to, Use Range Validation, Use a Regular Expression, Validation Rules), custom would have to be when my validation need is not met by these 4. Oh, and the 5th being is it required or not.

Also, IMHO, I find the help documentation the best I've ever seen for a product. What I posted came straight out of the help document. The help is Contextual also!! So from the Single Line of Text control settings, I click on Help, and I immediately see the text I copied and pasted under Validation. It thoroughly defines how to use validation on the control. That should be very useful for designers, and when I train, I encourage designers to use it and always demo its usefulness.

Badge +3

I would agree with you if all custom validation worked in this field, but it does not.  Only JavaScript functions work in this field.  You can't just create a custom validation function using the inline functions, to do that you have to use a rule.  That's why I think the field label should have 'JavaScript' in it. 

Reply