Jul 12, 2011, 12:50 PM
64 Posts

Can custom property validation make one or another required?

  • Category: Other Domino Designer Tooling
  • Platform: Windows
  • Release: 8.5.1
  • Role: Developer
  • Tags: Custom Control Properties
  • Replies: 3
- I have a custom control with piles of properties, most of which are optional.  Two of them however, are such that one of them is required but not both.  In the validation I have:
 
(first.toString!="" || second.toString()!="")
 
which does not work.  This fails if either one of the parameters is missing, where it need to succeed if either one of the parameters is present.
 
- I've found little to nothing so far on more advanced validation on custom properties.  Is this even possible?
 
Thanks for your time...
Jul 13, 2011, 11:58 AM
129 Posts
Re: Can custom property validation make one or another required?
Typo?
 
The first returns a reference to the toString function, while the other returns the result of toString()
Jul 13, 2011, 12:51 PM
23 Posts
Re: Can custom property validation make one or another required?
Maybe...
 
return ((first.toString() == "" && second.toString() =="")?false:true)
Jul 14, 2011, 12:39 PM
129 Posts
Re: Can custom property validation make one or another required?
I did a little testing, and it looks like the properties might not be aware of each other when the validation runs.