-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(form): deprecated and rename empty to notEmpty rule #2949
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Does that mean in future versions, if we are looking for en empty entry, we have to say "not[notEmpty]"? |
I would be fine with |
Infact the
Of course we could implement supporting this, but In case someone really wants to check for a string "empty" and a rule with the same name exists would then break/ not work again. It might als isn't trivial as we would need to support something like So existing code simply needs to be updated from |
Interesting and weird. How do you check for an empty entry then? Using "min[1]"? What about implementing a "notrule" or some characters that signal, we are looking not for a string, but another rule? |
You can use
TBH, this gets complicated and all the existing rules have opposite versions already to accomplish such checks. |
Docs added by fomantic/Fomantic-UI-Docs#483 |
Added new options from fomantic#2941 and fomantic#2949
Description
This PR renames the
empty
rule tonotEmpy
but keeps theempty
rule working for backward compatibility, so people can just upgrade their code for while. A console warning will tell them about.Reasons for renaming is that the code actually checks if a field is not empty. More explanation inside the related issue
Closes
#2937