Skip to content
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

Update Filter to support multiple rules per field #31

Closed
wants to merge 1 commit into from
Closed

Update Filter to support multiple rules per field #31

wants to merge 1 commit into from

Conversation

rossey
Copy link

@rossey rossey commented Oct 31, 2013

Signed-off-by: Alex Ross alex@wearebase.com

Signed-off-by: Alex Ross <alex@wearebase.com>
@harikt harikt mentioned this pull request Oct 31, 2013
@harikt
Copy link
Member

harikt commented Oct 31, 2013

Thank you for looking and implementing this, but it has been removed for #13 , #11 .

conclusion is Aura.Input is not the final filtering system.

@rossey
Copy link
Author

rossey commented Oct 31, 2013

Hi Harikt,

It's not clear from the documentation that you can only have one rule for one field. I would expect to add multiple rules to a field e.g. when checking an e-mail address is a) required, b) valid, c) not already in use?

Thanks!

@pmjones
Copy link
Member

pmjones commented Oct 31, 2013

Hi @rossey --

We wanted to provide some level of filter functionality, but we want to stop way short of building in a full filtering system; a single closure seemed like a good compromise there. The idea is that you can have as much filtering logic in the "one rule" for that field as you like.

Your comment on the documentation is well-made; I'll update it to address the issues you raise here.

I hope that helps a little; I won't close this issue until I hear back from you.

Thanks for the report!

@rossey
Copy link
Author

rossey commented Oct 31, 2013

Hi @pmjones,

That is a fair point. I suppose the issue I was trying to solve was trying to return different error messages for the same input, do you know if that is possible?

Thanks :)

@pmjones
Copy link
Member

pmjones commented Oct 31, 2013

I get that. No, not with the limited filter system that exists now. :-/

(As a side note, different errors for the same input might lead to user frustration as they correct one error but are presented with another, but that may not be pertinent here.)

@rossey
Copy link
Author

rossey commented Oct 31, 2013

That's fine. I suppose it's a small use case that I'm trying to implement and probably only valid when trying to filter an e-mail address that is a) required, b) valid, c) not already in use.

Yes I agree there is a UX issue with different errors for the same input!

Thanks for you time @pmjones and I really like the Aura components and framework :)

P.S. As your Filter is nicely decoupled from the Form I've extended the Filter to provide this functionality for our application.

@pmjones
Copy link
Member

pmjones commented Oct 31, 2013

As your Filter is nicely decoupled from the Form I've extended the Filter to provide this functionality for our application.

Right on, man, that was exactly the intent. Glad you're finding it useful! :-)

@pmjones pmjones closed this Oct 31, 2013
@harikt
Copy link
Member

harikt commented Oct 31, 2013

@rossey I hope @pmjones addressed your issues.

Thank you using Aura. We are in the move to v2, and looking for feedbacks.

If you have something to specifically say using the v1 components have a shout at @pmjones . This is the right time https://groups.google.com/d/msg/auraphp/btIVi6Rxkhk/HJu3aS-ElEQJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants