Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.
This repository was archived by the owner on May 7, 2021. It is now read-only.

validation should change on some field #19

Description

@ZaynJarvis
  1. React does not allow input with null values. Hence presence in react doesn't actually work.
    a walk around will be presence: { allowEmpty: false }
  2. url tag with present: false doesn't work, a walk around will be
validators.urlAllowBlank = (value: any, ...others: any[]) => {
    if (isEmpty(value)) {
        return;
    }
    return validators.url(value, ...others);
}
xxx: {
  urlAllowBlank: true,
}
  1. [ discussion ] xxxExist validation cause huge overhead
  • Formik or any other form construction library may not be able to select name from the UI but use id to transmit info at the back.
  • select options are fetched from library initially, validate the field for another time may be an overhead. And there's more boilerplate code for name -> id transformation either in frontend or backend.

Metadata

Metadata

Labels

discussionDiscuss on the topicenhancementNew feature or requestquestionFurther information is requested

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