Validate sales order against quantity limit in customer

Hi all,
i am trying to validate sales orders against quantity in customer in a single day.
i.e i make a custom field in customer quantity and i pull that limit in sales order and try to validate against that customer using custom script. but it only validates for a particular sales order and i try to validate all the sales order that made against a single day.

how to achieve that help me with your suggestions.

thanks in advance.