×
Getting new Releases

To get notified on new releases you may follow us on twitter @expandframework or subscribe in our main RSS feed.

Topic-icon Validation Rule Warning support

More
5 years 11 months ago - 5 years 11 months ago #1319 by Tolis
Tolis created the topic: Validation Rule Warning support
I have extended eXpand (v11.1.8.7) with 2 more modules Validation.Win,Validation.Web. To change the behaviour of your normal rules and make them behave as warning you can either use the RuleWarning attribute as shown




or you can use the model editor





To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
Attachments:
Last Edit: 5 years 11 months ago by Tolis.
The following user(s) said Thank You: KobusSmit, luky_13

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago - 5 years 11 months ago #1320 by Tolis
Tolis replied the topic: Re: Validation Rule Warning support



This shots are taken from Xpand feature center

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
Attachments:
Last Edit: 5 years 11 months ago by Tolis.

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago - 5 years 11 months ago #1321 by krazana
krazana replied the topic: Re: Validation Rule Warning support
Very interesting, makes me kinda feel like in VS :) nice job, as always
I've got several questions:
  1. when the warning is visible? i mean is the only way to see warnings executing validation (showallcontexts) action?
  2. will it let me save a record if all the broken validation rules are marked as warnings?
  3. will it be an error if i specify rulewarning first param string equal to nonexisting validation rule?

p.s.:
what you think of transforming "rulewarning" way of marking validation rule as warning
to adding one more custom validation rule param?
like custommessagetemplate or targetcriteria?
may be something like:
[RuleRequiredFiled("unique_ident",DefaultContexts.Save,IsWarning=true)]

by the way, i have no idea of how to add such custom params, is there any info regarding it?
Last Edit: 5 years 11 months ago by krazana.

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #1323 by microfox
microfox replied the topic: Re: Validation Rule Warning support
Nice - waited a long time for this.
But I need another "warning type" - which is "Info".
That blue circle with the "i" in it.

Would it be possible to implement that?
e.g. RuleType.Warning, RuleType.Info, RuleType.Error
where RuleType.Error is the default XAF behaviour.

Robert

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #1324 by Tolis
Tolis replied the topic: Re: Validation Rule Warning support

when the warning is visible? i mean is the only way to see warnings executing validation (showallcontexts) action?


The idea was really simple. It is possible to use validation rules as we used to while at the same time we can mark them as warnings. In a nutshel the implementation first finds if a RuleWarning attribute exists then it updates the IsWarning attribute. Finally there is a controller that queries warning model rules and just changes the icon from error to warning.

will it let me save a record if all the broken validation rules are marked as warnings?

Yes however if a property has 1 broken non warning rule and 1 broken warning rule then an error icon will be displayed.

will it let me save a record if all the broken validation rules are marked as warnings?

no it will behave as normal validation rule.

p.s.:
what you think of transforming "rulewarning" way of marking validation rule as warning
to adding one more custom validation rule param?
like custommessagetemplate or targetcriteria?
may be something like:
[RuleRequiredFiled("unique_ident",DefaultContexts.Save,IsWarning=true)]


This is not possible with our providing Xpand versions for every rule

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #1325 by Tolis
Tolis replied the topic: Re: Validation Rule Warning support
Nice - waited a long time for this.
But I need another "warning type" - which is "Info".
That blue circle with the "i" in it.

Would it be possible to implement that?
e.g. RuleType.Warning, RuleType.Info, RuleType.Error
where RuleType.Error is the default XAF behaviour.

This is an interesting idea. I believe we can easily use rules to make our XAF applications emotional. I will extend the current implementation to support custom icons in v11.1.8.8

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand

Please Log in or Create an account to join the conversation.

Time to create page: 0.261 seconds