lenra-io/lenra_components

Is 'utils' belongs to this library ?

開放

#7 建立於 2021年8月18日

 (4 則留言) (0 個反應) (0 位負責人)Dart (0 個分叉)auto 404
help wantedinvalidquestion

倉庫指標

星標
 (4 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

There is a folder 'utils' that give some helpers to :

  • parse a color
  • validate textfield input (password/email)

The color parser is not used by the library. It is just exposed as part of the lib. The validator is partially used by the lenra_text_form_field.dart component to check the value of the input based of the type parameter (email or password).

I think we can safely remove the color parser but i'm not sure about the validator :

  • Is it our job to check the value of the input ? If not, we should remove the validator.
  • If it is our job, we should provide a way for the user to completely override the validator (not just add on top of the existing validator).
  • Should we add more types in the futur ? (phone number, address...)

@lenra-io/lenra any thought ?

貢獻者指南