Skip to content

When creating a Datasource, Input Field Checking is not always enforced #4632

@riversdev0

Description

@riversdev0

Describe the bug

If you have a custom field attached to a Data Input Method, that field will only be validated for acceptable data upon being edited, not upon creation.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Data Input Method with a custom Input Field
    image

  2. Set a Regular Expression Match on the Input Field
    image

  3. Create a Data Source Template that allows the user to modify the value of Input Field
    image

  4. Create a Graph Template referencing that Data Source Template

  5. Add a graph using that template to a device. Set the Custom Data to something outside the range of the validation pattern.
    image

  6. Edit the brand new Data Source and observe that the value is out of range.
    image

  7. Save the Data Source with no changes. Observe that the validation fails.
    image

Expected behavior

I would expect the Input Field Checking validation pattern to be enforced upon creation of the Data Source, just as it is during the modification of the Data Source.

Version info

  • Cacti 1.2.19

Additional context

I'm willing to help fix this, but some others probably know from memory where the relevant code is located.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions