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

  • Home
  • SEARCH
  • 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 176463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:52:56+00:00 2026-05-11T13:52:56+00:00

This is the property declaration in question: [RangeValidator(1,RangeBoundaryType.Inclusive,255,RangeBoundaryType.Inclusive,MessageTemplate = StartFlexibility is out of range)]

  • 0

This is the property declaration in question:

 [RangeValidator(1,RangeBoundaryType.Inclusive,255,RangeBoundaryType.Inclusive,MessageTemplate = 'StartFlexibility is out of range')]     public byte StartFlexibility { get; set; } 

When the validate method is called, a FormatException is thrown telling me that the value type needs to be Int32.

How to fix, please?

  • 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. 2026-05-11T13:52:57+00:00Added an answer on May 11, 2026 at 1:52 pm

    well… the quick obvious fix will be change the type to short or int,

    but another observation i want to do, is with the range. You are telling the RangeValidator to take a inclusive range between 1 and 256, but you just can assign a byte value till 255, maybe that’s the compiler reason to cry out.

    The RangeValidator is also infering the type of the Range from the parameters, so, try casting

    [RangeValidator((byte) 1, ... 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the properties declaration: @property (atomic, weak) zooView* zooView; This is my custom
If we define a property as public property and in this property we have
I have a MY_Controller class with this property: class MY_Controller extends CI_Controller { public
I am reviewing for my final, and I cannot figure out why this question
I have Question related to nsdate declaration. NSDate *sortDate; @property(nonatomic,retain) NSDate *sortDate; @synthesize sortDate;
I have this retained property declared like this: @property (nonatomic, retain) NSMutableDictionary *codes; then
Object doesn't support this property or method It's this line. pthumb = $(#pthumb).attr(src); Does
I am trying to do something like this: property = 'name' value = Thing()
I have a variable declared like this: @property (nonatomic, retain) NSMutableArray *aInfo; At the
The documentation for the toolbar property in UINavigationController says: This property contains a reference

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.