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 529461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:05:40+00:00 2026-05-13T09:05:40+00:00

I am attempting to validate a range dollar amount. The value must be less

  • 0

I am attempting to validate a range dollar amount. The value must be less than (not equal to) the input currency amount, which can be represented in multiple currencies.

How can I represent this value? Should I convert to decimal and subtract 0.01? If that doesn’t work, why not? I’m using C#.

I’m possibly over-thinking an obvious solution, so an “Uhhhh do ‘X’ ” type of response would not surprise me.

Thanks for any insight.

  • 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-13T09:05:40+00:00Added an answer on May 13, 2026 at 9:05 am

    Seeing as how you say it can be in different currencies, Are the values you are comparing both of the same currency? If not then your range will need to be even more dynamic as some foreign currencies may result in a larger number than your initial value.

    So for example if you are comparing a USD 100 to YEN which would be about 92 yen per dollar for 9200 yen (on average) for today. that would not really match up. It’s best to compare same currency to same currency for ranges.

    Also you never said what your range is. You are only talking about your Maximum. What’s your min? Is it Zero what if you have a negative amount? If this was a trading application you could have positive and negatives.

    Your best bet if you have a maximum value is to convert your entered value to whatever similar currency you have and then adjust validate that it’s less than or equal to your max value. Which might be better in a codebehind validation vs a range validator.

    So lets assume you are using a trading app. You have a Trade Limit say 1000 USD. The user is doing an international trade in YEN. When you go to do your checks you will have to get the FX Rate for the day, divide it into your YEN entered amount and verify that it’s less than or equal to your limit. In a trading scenario you could use an ABS value so that a Buy or Sell net out to the same 1000 limit. Since this is a bit more complicated than a simple range check I would personally recommend doing your own validations either with jQuery / AJAX or just plain code behind.

    May make your life much easier.

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

Sidebar

Ask A Question

Stats

  • Questions 366k
  • Answers 366k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use permission like you show and give the… May 14, 2026 at 4:34 pm
  • Editorial Team
    Editorial Team added an answer Updated for comments - You can do it like this:… May 14, 2026 at 4:34 pm
  • Editorial Team
    Editorial Team added an answer I'm not sure of the proper way, if availble, but… May 14, 2026 at 4:34 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.