Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 378049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:45:20+00:00 2026-05-12T14:45:20+00:00

I played around with nhibernate validator and got a nearly perfect solution. I can

  • 0

I played around with nhibernate validator and got a nearly perfect solution.

I can define a property to be validated and it’s done on pre-save. But I have some cases where it’s not working.

Let’s assume I have an object called person and via nhibernate I mapped the address(also an object) to be a property of person (in fact it’s a list of addresses).

When I save the person my address is not validated.

The form to enter the information is made out of partial forms. Would be nice if the address validation could be added to the person’s validation list, but thats not required.

I need a general solution, I cannot validate by “hand” e.g. if person then validate address… Somehow the validator should see that there is an object behind the property which I also have to validate.

Update: What I am looking for is a way to validate mapped objects (hasmany).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:45:20+00:00Added an answer on May 12, 2026 at 2:45 pm

    After switching to the newest release of nhibernate validator the validation works for subclasses and mapped classes. Together with xVal 1.0 it’s a very satisfying solution.

    Now I can define on every property against what it should be validated (e.g. for a regex, length etc…) and I get the message on client side via xVal, on server side via nHibernate Validator. In fact they share the validation pattern and the error messages.

    I would recommend this for any nHibernate-Project where a simple definition for validation and messaging is required.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've played around quite a bit now, and can't seem to get variables to
I've played around with the WPF Popup Control and as far as I can
hey i played around with bundler and some gems and now i can't use
It has been many years since i played around with AS2 and can't seem
Alright, i've played around with this for over a week now and I can't
I played around with it for a while, but I simply can't figure it
I have played around with smart phone development (windows ce), and it seemed pretty
I've played around with the netbeans visual editor for java and it seems very
I have played around with Scala for a while now, and I know that
I have played around and implemented JQuery cycle to create a carousel with images,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.