In addition to aquinas's excellent suggestions, one strategy I used with my children was to teach them specific check-your-work questions, especially for math:
1. Did I answer the question?
2. Does my answer make sense?
3. Do I have the correct units (and later, significant figures)?
There was a tendency to feel that having the concept down, but making careless errors, shouldn't count against them...which to some extent I agree with at the conceptual instructional level. But the long-term value of learning to catch these careless errors is extremely high at the application end. I think my children are all pretty tired of being asked what would happen if you were the civil engineer on a bridge construction job, and you sent over plans that were, say, in centimeters instead of meters, or were off by a factor of two, or had a misplaced negative sign!
I think it's critical to address both aspects: appropriately challenging work, without mindnumbing repetition of already-mastered concepts, as well as attention to detail as a precursor of good work skills with real-life impacts.
Practically speaking, my approach in homeschooling was to mark off mistakes (on assessments), but allow them half-credit back for spontaneously identifying and correcting the errors. It helped that I tried to present them with assessments with higher ceilings, so that the top end of the scale was spread more than the bottom end.
Another approach, especially for homework/reinforcement assignments, would be to take a page from many of the adaptive learning platforms, and say that correct performance of a certain number of items in this item type in a row (or maybe x out of y items correct in a row) gets you out of the rest of them. This, of course, depends on the reason the child is making careless errors, since it also has the potential for being rather frustrating, if one keeps just missing the criterion.
When I make reduced workload recommendations for students, I usually suggest that the instructor select specific items to demonstrate mastery. Correct completion of those marked items constitutes full credit for the task. You can do the other items if you want, but they're not required. (This is usually an accommodation for students with low processing speed, but it applies equally to highly-skilled students who need an exit strategy out of unnecessary repetition of skills.) In the case of use for high-skill students without processing speed weaknesses, I would say that if the marked items aren't all correct, your options are either to just take the consequences as is, and try to be more careful next time, or do the remaining items (more carefully!) to offset the errors.
These above suggestions all assume that the primary reasons for the errors in attention to detail are accessible to motivational interventions (i.e., they are related to attention or motivation). It is also possible that they arise, either partially or completely, from other causes, such as visual organizational weaknesses, in which case, all of these variations of exhorting them to do better (with and without carrots) will have limited effect.
In that case, it might be helpful to try imposing a little more structure on the visual layout of the task, such as by doing math on grid/square paper (helps to line up digits), printing up reference sheets of procedural checklists or flowcharts to use right next to the math paper, or teaching conventions for marking key components of the math problem (such as underlining, boxing, or circling the answer, rewriting the answer in a specific location relative to the work, or highlighting signs, operations or decimal points in specific colors, to draw attention to commonly-overlooked details).