Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Issue in FormBuilder addTextField #64

@rlee570

Description

@rlee570

Hello,
When using the formbuilder I encountered a bug with the addTextField function. The bug is because the parser for message ML does not allow the max length field to be set and the function allows maxlength to be passed as a parameter. In addition there is a bug with the minimum length where it is set to 0 in the function parameters which is not a valid value as the value needs to be between 1-128. I would fix this in a pull request but I don't have the rights. So here is a quick fix I'm using below. I've replaced the code From line 36 onwards in lib/Formbuilder/index.js.

const addTextField = ( name, display, placeholder, required = false, masked = false, minlength = 1 ) => { tagBuilder.messageML += Tag( "text-field", { name, placeholder, required, masked, minlength }, display ); return tagBuilder; };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions