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
How to get the tokens #52
Comments
|
Closing for a different approach is being used. |
|
Hi Paul, I don't know whether I am throwing something before the complete implementation. But I would like to ask a question . I feel when we are using something like If it is just string like Apart from that the Thank you |
|
Fair question! First, the "strlen(6)" thing is a default message only, and is intended to be overridden with a custom message. You provide a custom message by specifying the rule mode, e.g. For translation, you could enter "FILTER_SOMETHING" as the message, and then pass it through a translator at output time, but it still doesn't get you the filter arguments, like 6 as in strlenMin(6). To support translations with interpolated argument values, I can see where we would have to change the getMessages() return format so that it returns both the string message and the filter arguments. Let me think about that one a little bit. |
|
@pmjones this was what I did earlier https://github.com/auraphp/Aura.Filter/pull/53/files . But as things are changed it need a bit different ways though . |
|
I think we're getting closer to a final implementation here. Do you think this issue is still important, or is it something we can let go? |
|
Hi @pmjones , I think this issue is a bit important when you want to deal with translation. What I thought was keeping something like having a constant values and use some |
|
Thank you @pmjones . Looks good 👍 . |
|
By the way @pmjones in case if you have not forgotten https://groups.google.com/d/msg/auraphp/dVpSOV6RnM4/BZLPpYzMoDQJ before a beta release good to have common interface, so it can communicate with Aura.Input also ? |
|
Closed by #84 . |
|
@harikt The rules for Aura 1.x packages are such that they cannot depend on external packages, which means even if there was an interface package, Aura.Input 1.x could not depend on it. At the worst, though, there could be a "bridge" interface between the two in yet another package. |
|
@pmjones As Aura.Filter is v2, we can bring an interface to 2.0 . And later the 1.0 package can be bumped to 2.0 to use the same interface package. No other changes for Aura.Input . |
When working with Aura.Intl how could we get the tokens that need to be passed .
Eg :
The
minandmax, may be something likegetTokens()on theRuleCollection::addMessageFromRulewill help ?/ cc @cordoval
The text was updated successfully, but these errors were encountered: