CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Browse Site by Tags

Showing related tags and posts across the entire site.
  • Rules called multiple times after 4.5 upgrade

    Hi! Our Silverlight 5 application's BOL has a couple of business objects with pretty deep hierarchy. Such as ProductEdit => SectionList => SectionEdit => FieldList => StepList => StepEdit =>SecuritySettingsList=>etc. Some validation rules defined on child level but other like...
    Posted to CSLA .NET discussion by mparsin on Wed, Feb 13 2013
  • Custom validation attribute to be used in CSLA objects

    I know how to create custom validation attributes and I know how to make ASP.MVC client validation work with those attributes if I implement IClientValidatable interface, but then I would need to reference System.Web.MVC in the library containing my CSLA objects. Is it possible to create a custom validation...
    Posted to CSLA .NET discussion by correodemarques on Fri, Jan 11 2013
  • AddOutValue not working in 4.5 if objects are equal

    Hi, I have a problem with new rule engine 4.5 of CSLA. While returning object (not value!) from asynchronus validation rule with using RuleContext.AddOutValue, property is not being set if value from rule and the one that is currently present on property are equal (Object.Equals). I was wondering do...
    Posted to CSLA .NET discussion by mesh on Thu, Nov 22 2012
  • Re: Business rules - adding InputProperties causes rules to run

    This is a featuire not a bug. In the simple case, the validity of the rule is determined by a single property. For example, a telephone number must have so many numeric digits; any other condition causes the rule to fail. But there are situations where several values must be inspected to establish the...
    Posted to CSLA .NET discussion by JonStonecash on Fri, Jun 22 2012
  • Suppress specific validation rule

    Hi, I was wondering if there is a way to suppress a specific validation rule when calling ICheckRules.CheckRules? I have a Name property on an object, and it has 2 rules registered to it: a Required rule, and an async NameUnique rule, which checks in the database if the name already exists. Since in...
    Posted to CSLA .NET discussion by Maxime Gaudreault Proulx on Mon, May 28 2012
  • ValidationRules That Modify Property Data (Csla 3.8.3)

    Hi, I was hoping to create a common validation rule which would modify the data of a property. If the phone number provided is only 7 digits, automatically append a default area code. If i create the rule for each class that has a phone number, this is not an issue, as I can access LoadProperty to set...
    Posted to CSLA .NET discussion by Matthew Copeland on Mon, Feb 6 2012
  • Common Rule Validation StringRequired not returning the proper language/culture translated message

    Hi, We use CSLA 3.6.2 on windows 7 with vs2010. Our app can be run in multiple languages with English as our primary language. Our problem is that when the app's culture is set to something other than English (de-DE), the string returned from a StringRequired validation is an English property name...
    Posted to CSLA .NET discussion by mrb@cspace on Wed, Dec 7 2011
  • Issue with Validation Rules Refreshing with Prism...

    Hello, We are using CSLA 4 and Prism 4 for a WPF application. Currently, we are using the CSLA.ViewModelBase for our view models. The first time I navigate to a view, the object is created and the validation errors show correctly. The issue comes the second time I load the view. It seems like the PropertyStatus...
    Posted to CSLA .NET discussion by reagan123 on Wed, Dec 7 2011
  • ValidationRules vs PropertyHasChanged?

    We are using CSLA 3.8.x and want to build some validation rules that configure some default values whenever a property has changed. We are using validation rules as has been suggested on this forum, so to minimize the amount of code that goes into the setter methods in our properties. However, this causes...
    Posted to CSLA .NET discussion by Marjon1 on Sun, Oct 30 2011
  • Custom Busines Rule for numeric property

    Hello, I've a Custom Rules that checks if the user entered a valid numerical value (Double.TryParse) I override the AddBusinessRules Method and added the rule like this: BusinessRules.AddRule(new Business.CustomRules.Numerical(PreislistePos.PreisNormalProperty)); It works fine, as long as the user...
    Posted to CSLA .NET discussion by Kevin on Wed, Jul 27 2011
  • Re: Braking rules that are not broken.

    Generally in a case like this I would determine one property only as the primary, in this case I would nominate end-date and build the rule and then also add a start-date as a dependent property (using 3.8 rules engine). So that when the start date value was changed it will fire the end-date business...
    Posted to CSLA .NET discussion by Marjon1 on Mon, Jul 25 2011
  • Re: [csla 3.8.4] WPF-Textbox Visibility bound to PropertyStatus.CanRead -> Breaks Required validation rule!

    So then again, here comes my question unchanged: How do the built-in validation rules (e.g. StringRequired) handle this issue in 3.8.4 vs. 4? P.S.: In any of my posts did I say that rules were called from a getter, but the rules themselves call the getter to do their work.
    Posted to CSLA .NET discussion by stefan on Fri, May 6 2011
  • Re: [csla 3.8.4] WPF-Textbox Visibility bound to PropertyStatus.CanRead -> Breaks Required validation rule!

    I finally found the issue. It is an old one that I often struggled with: The DataAnnotation rule accesses the object's properties just like any user would. So if CanReadProperty returns false, the rule just sees a default value (""|0|NULL). This somehow contradicts: [quote user="RockfordLhotka"...
    Posted to CSLA .NET discussion by stefan on Thu, May 5 2011
  • [csla 3.8.4] WPF-Textbox Visibility bound to PropertyStatus.CanRead -> Breaks Required validation rule!

    I have a WPF Textbox with its Visibility bound to the CanRead property of a Csla.Wpf.PropertyStatus control. The Text is bound to a string property of my business object which is decorated with the Required attribute from the System.ComponentModel.DataAnnotations namespace. When CanRead evaluates to...
    Posted to CSLA .NET discussion by stefan on Wed, May 4 2011
  • Validation Rule Dependency

    I have a site where members are able to select the country they are from. If they are from the US, I need to validate that they enter a zip code. If international, I need to validate that a region and city name are specified. I have two questions with validating several dependent properties... Question...
    Posted to CSLA .NET discussion by ballistic on Thu, Apr 28 2011
  • CSLA Validation rule

    Hi All, Is there any way to call a validation rule only when saving the object and not whenever the property is set? If so should that validaiton be set on a particular property? Last option I see is to make the validation rule a method and call it before save. Please let me know if there are other ways...
    Posted to CSLA .NET discussion by rkbelthur on Thu, Apr 7 2011
  • Validation of Min/Max Value in csla 4.x

    Hello! I want to Validate 2 Fields MinValue and MaxValue, that MaxValue is more or equal to MinValue. My first Solution was to make one Validation Object, but this doesn't Work because the Data Portal throw an exception that there ist already a Element with the same name. My Code (try) with one Validation...
    Posted to CSLA .NET discussion by ThiloS on Fri, Jan 28 2011
  • Validation

    Hi We are using CSLA version 2.0 on .NET 2.0 VS2005. In my project, I'm using a datagridview, with child data. In the design, we add extra rows to the datagridview on the Fetch. We do this so that the user doesn't have to add additional rows; they are only allowed a certain number. Any ways that...
    Posted to CSLA .NET discussion by ksavoie on Wed, Jan 26 2011
  • Re: ValidationRules.AddRules(delegate, propertyInfo) does not work

    Thansk for the reply. 1. The rules does point to static methods. Here is an example: public static bool HasValidAccountingPeriod ( VoucherLine target, RuleArgs ruleArgs) { if (target. AccountingPeriod == null ) { ruleArgs. Description = GetIsRequiredDescription (ruleArgs); return false ; } if (target...
    Posted to CSLA .NET discussion by Presley on Wed, Dec 15 2010
  • ValidationRules.AddRules(delegate, propertyInfo) does not work

    Hi, I have the following code: protected override void AddBusinessRules() { // Do not validate is marked deleted if (IsDeleted) return; AddValidationRule(AccountingClientProperty, VoucherLineValidator.HasValidAccountingClient); AddValidationRule(AccountingPeriodProperty, VoucherLineValidator.HasValidAccountingPeriod...
    Posted to CSLA .NET discussion by Presley on Tue, Dec 14 2010
Page 1 of 1 (20 items)

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems