-
Notifications
You must be signed in to change notification settings - Fork 28
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
T667 validate unique project name in creation form #299
T667 validate unique project name in creation form #299
Conversation
… save is clicked - REST
… save - validator WIP
…draZizka/windup-web into OndraZizka-T667-validatorDuplProjectName
@OndraZizka I'm afraid this will require async server based validation and AFAIK it is not currently supported by Angular :( Edit: Yep, situation still hasn't changed. See those issues: (I'm kind of monitoring this, because I already wanted to do that, but currently it seems either not possible at all or possible with some very hacky complicated workarounds :( ) |
Give it a try. Maybe it won't be such a big problem as I thought... It has been while since I last tried to do something similar, so maybe there is some solution now. |
@klinki - We have been doing async server-side validation for the file paths for a long time now. :) I sent @OndraZizka a PR to fix the issues here yesterday. It seemed to work? |
@jsight Yep, I realized that now. But I think we are using 2 kinds of forms - template driven and class driven? So maybe it doesn't work for one of them... But maybe this is not an issue after all. I think I might have mistaken the issue with different one - I remember I wanted to do similar thing once, but I wanted to use Sorry for causing confusion. |
@klinki - No worries... I actually sent him a PR last night that seemed to make it work: OndraZizka#4 |
@klinki - Interestingly, when I did the file validator, I actually did model driven in large part because I thought that it wasn't possible to do it as a directive. I think that I was probably wrong back then, too. :) |
@jsight Anyway, based on github issues, there are still multiple problems with async validation. But in our case, we are lucky enough by not having multiple validation steps on single field, so those issues don't affect us that much :) (especially one with race conditions among sync/async validation results) |
@klinki - Haha, yeah, I can imagine that it could get complicated if we had more complex requirements. |
…tName Ondra zizka t667 validator dupl project name
@jsight Now the fun begins - we will have 2 validators :) sync for length and async for project name... |
@klinki I didn't have any problems with them when I tested it. Obviously that wasn't comprehensive, though. |
Still something is missing, not sure what