One approach is Single Case Union Types with the private keyword. Private limits the type creation within the scope of the module or file. Type creation outside the scope is typically exposed through a create function.

Code Snippet
type UnitQuantity = private UnitQuantity of int
module UnitQuantity =
let create unitQuantity =
if unitQuantity < 0 || unitQuantity > 1000 then
"Quantity cannot be less than 0 or greater than 1000" |> Error
else
unitQuantity |> UnitQuantity |> Ok
let value (UnitQuantity q) = q
let unitQuantity = UnitQuantity.create 11
match unitQuantity with
| Ok unitQuantity ->
unitQuantity
|> UnitQuantity.value
|> printfn "Unit Quantity is %i"
| Error error ->
error
|> printfn "Error: %s"