Why does "decimal.TryParse()" always return 0 for the input string "-1" in the below code?

You forgot to tell TryParse that the leading sign is OK

decimal validity = -1;
var validityStr = "-1";

decimal.TryParse(validityStr, 
    NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign,
    CultureInfo.InvariantCulture, 
    out validity);


As per documentation:

When this method returns, contains the Decimal number that is equivalent to the numeric value contained in s, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null or Empty, is not a number in a valid format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uininitialized; any value originally supplied in result is overwritten.

Since the conversion failed, validity becomes 0. To make sure the conversion works you should add NumberStyles.AllowLeadingSign