Page MenuHomeVyOS Platform

XML: router-adver: validate both string (regex) and number
Open, Requires assessmentPublicBUG


Having the following validation statement in for e.g.

<leafNode name="valid-lifetime">
    <help>Time in seconds that the prefix will remain valid (default: 30 days)</help>
      <description>Time in seconds that the prefix will remain valid</description>
      <description>Prefix will remain preferred forever</description>
      <validator name="numeric" argument="--range 0-4294967295"/>

Will print: 'infinity' is not a valid integer number but the value is accepted. How can we both validate a string an an integer for the same node?


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

c-po created this task.Aug 4 2020, 8:22 AM
pasik added a subscriber: pasik.Aug 4 2020, 9:51 AM

Before adding "<defaultValue>" it was working but not now.

I tried

  <validator name="numeric" argument="--range 0-4294967295"/>
  <validator name="fqdn"/>

2 validators also don't work.

I would have expected the output generated to be an OR of the validators or regexes and allow the output if any would have passed it