set_col_customrule()

  • Parameters:
    • $col_name: column name
    • $custom rule: Javascript function to validate data
  • Description:
    • Create custom javascript validation for column value during edit. phpGrid has automatic default validation based on database data type. This method comes in handy when additional data validation is required such as value range, data dependency etc.
  • Example:
1
2
// price_validation1 is a javascript function. See related associate live example for complete implementation
$dg->set_col_customrule('quantityInStock', 'price_validation1'); 

🎉 phpGrid is now open source! – Free under the MIT license • Download the latest release on GitHub

X