Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Imagine you were in a room and it is your job to make sure that blocks inserted through a hole in the wall were round. To achieve this value, the hole is made round. Your job, when you get a square block, is to sound the alarm, which is 3 bells.</p> <p>Now, someone comes along and attempts to place a square block through the round hole. Ooops... It doesn't fit. So you never get the square block and can't sound the alarm. Instead, the person sounds an alarm of 2 bells because he can't fit the square block in the round hole.</p> <p>In this comparison, the regular expression is you. You are told to validate something that cannot possibly happen, because abc cannot be stored in a decimal value. Therefore, the value of Latitude or Longitude can never NOT be a valid decimal value (particularly since you did not use a nullable decimal, therefore it's default value is always 0.0 and cannot be null).</p> <p>Meanwhile, the MVC framework notices that you're trying to stuff a character string into a decimal value, which it can't do.. so it throws a generic error.</p> <p>In other words, using decimal automatically validates that it's a valid decimal number. If you use a nullable decimal, then it validates it's a decimal number or null. You can then use the Required validator to ensure it's not null and pass your own message.</p> <p>If you want to use the regular expression validator, you will have to make Lattitude and Longitude strings, and then convert them to decimals later in the process.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload