i'm developing hospital management product.
Blood Management is there which is having blood status contains blood group and blood quantity.
While giving blood to patient i need to refer blood status table & quantity should be less than or equal.

i want throw error back if quantity is more than available blood .
How can i implement this.?


Jaypan’s picture

Are you wanting to code this, or use contributed modules?

hiramanpatil’s picture


Check below contributed modules to add validation for the fields.

1. https://www.drupal.org/project/field_validation
2. https://www.drupal.org/project/clientside_validation

Also you can add submit handler to validate the fields in your custom .module file.