I've added a key_value field for "Additional costs" to a custom post type. The key is a text description of the cost and the value is a dollar amount. I'd like to validate submitted keys and values separately.
Selecting validation (for example "Decimals") in the Advanced tab of the Edit Field Group page will validate both the key and value. So it fails because the keys are text.
1) Is there any way to validate the submitted key and value separately?
2) Is it possible to validate just the value submitted?
I'm afraid that it isn't possible. Both key and value are the field data and you can get the field data, extract the key or value from the array and validate one of them. The submitted data has the format:
[key_value_crx6rkqqts] => Array
 => Array
 => test key
 => test value