FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
My validation caught everything. Except what mattered.
NewsProgramming Languages

My validation caught everything. Except what mattered.

via Dev.to PythonNico Reyes3h ago

Built data validation for a product feed importer. CSV comes in, checks run, flags issues. Clean data goes to database. Spent a week on it. Checked for empty fields, invalid URLs, price format, date format, SKU format. Passed every test. First real import. 2000 products. Zero validation errors. Perfect. Client checks dashboard next morning. "Why do 400 products say $0.00?" Turns out zero is valid Prices were there. Format was valid. Just all zeros. My validation: def validate_price ( price ): if not price : raise ValidationError ( " Price required " ) try : float_price = float ( price ) except ValueError : raise ValidationError ( " Price must be number " ) if float_price < 0 : raise ValidationError ( " Price cannot be negative " ) return True Looks fine. Checks for empty, checks format, checks negative. What could go wrong? Everything apparently. Zero is technically valid. Not empty. Not negative. Passes all checks. But no product costs $0. Obviously wrong data. Went back through CSV.

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
0 views

Related Articles

Social gaming platform Rec Room, once valued at $3.5B, is shutting down
News

Social gaming platform Rec Room, once valued at $3.5B, is shutting down

TechCrunch • 14m ago

MLA+MOE based model and T5 comparison who wins?
News

MLA+MOE based model and T5 comparison who wins?

Medium Programming • 17m ago

[MM’s] Boot Notes — The Day Zero Blueprint — Operations from localhost to production without panic
News

[MM’s] Boot Notes — The Day Zero Blueprint — Operations from localhost to production without panic

Medium Programming • 18m ago

The US Military’s GPS Software Is an $8 Billion Mess
News

The US Military’s GPS Software Is an $8 Billion Mess

Wired • 44m ago

The Promise of 'Woke 2' Is Fueling a Leftist Fever Dream
News

The Promise of 'Woke 2' Is Fueling a Leftist Fever Dream

Wired • 47m ago

Discover More Articles