How to tell if a cell value has passed validation

kiwichris

I am familiar with the Google Apps script DataValidation object. To get and set validation criteria. But how to tell programatically if a cell value is actually valid. So I can see the little red validation fail message in the spreadsheet but can the fact the cell is currently failing validation be picked up thru code?

I have tried to see if there is a cell property that tells you this but there is not. Also I looked for some sort of DataValidation "validate" method - i.e. test a value against validation rules, but nothing there either

Any ideas? Is this possible??

JSDBroughton

Specific answer to your question, there is no method within Google Apps Script that will return the validity of a Range such as .isValid(). As you state, you could reverse engineer a programatic one using Range.getDataValidations() and then parsing the results of that in order to validate again the values of a Range.getValues() call.

It's a good suggestion. I've added a feature request to the issue tracker -> Add a Star to vote it up.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

how to check whether cell has anything in it

来自分类Dev

DataGridView Event to Catch When Cell Value Has Been Changed by User

来自分类Dev

How to get records if a column has value A, if not then B?

来自分类Dev

How to edit row in datagrid after getting some validation errors in any one of the cell

来自分类Dev

How to count cells in a range with a value less than another cell in excel?

来自分类Dev

Compare value of cell in vba

来自分类Dev

Assigning to a new value to an object passed into a function in JavaScript

来自分类Dev

How to access viewmodel's property value in custom validation attribute to alter messages?

来自分类Dev

How to tell the precedence of operators in a context free grammar

来自分类Dev

javafx treetableview cell value not getting updated

来自分类Dev

Alert custom attribute value jquery table cell

来自分类Dev

get the value of first cell of last row

来自分类Dev

Excel VBA如果cell.Value = ...则

来自分类Dev

Change/clear form value on validation error

来自分类Dev

Display the enum value that is passed to c++ class constructor

来自分类Dev

How to shuffle the rows in a cell array

来自分类Dev

How to prevent fake form validation

来自分类常见问题

How to tell Maven to disregard SSL errors (and trusting all certs)?

来自分类Dev

How can I tell Spotlight to index my .dSYM bundles?

来自分类Dev

How to call a function or tell if a MKPointAnnotation is clicked on a MKMapView SwiftUI

来自分类Dev

How do I tell if an XMLHttpRequest failed due to a network issue?

来自分类Dev

How can I tell if a hard drive will fit my laptop?

来自分类Dev

How can I tell if a hard drive will fit my laptop?

来自分类Dev

timestamps passed to matplotlib.date2num: 'str' object has no attribute 'toordinal'

来自分类Dev

AngularJS : check if a model value has changed

来自分类Dev

InStr(1,cell.Value,“-”)似乎与Not不兼容

来自分类Dev

Pandas sum across columns and divide each cell from that value

来自分类Dev

PHPExcel set font/background colour based on cell value

来自分类Dev

create a paired value cell array from existing vectors

Related 相关文章

  1. 1

    how to check whether cell has anything in it

  2. 2

    DataGridView Event to Catch When Cell Value Has Been Changed by User

  3. 3

    How to get records if a column has value A, if not then B?

  4. 4

    How to edit row in datagrid after getting some validation errors in any one of the cell

  5. 5

    How to count cells in a range with a value less than another cell in excel?

  6. 6

    Compare value of cell in vba

  7. 7

    Assigning to a new value to an object passed into a function in JavaScript

  8. 8

    How to access viewmodel's property value in custom validation attribute to alter messages?

  9. 9

    How to tell the precedence of operators in a context free grammar

  10. 10

    javafx treetableview cell value not getting updated

  11. 11

    Alert custom attribute value jquery table cell

  12. 12

    get the value of first cell of last row

  13. 13

    Excel VBA如果cell.Value = ...则

  14. 14

    Change/clear form value on validation error

  15. 15

    Display the enum value that is passed to c++ class constructor

  16. 16

    How to shuffle the rows in a cell array

  17. 17

    How to prevent fake form validation

  18. 18

    How to tell Maven to disregard SSL errors (and trusting all certs)?

  19. 19

    How can I tell Spotlight to index my .dSYM bundles?

  20. 20

    How to call a function or tell if a MKPointAnnotation is clicked on a MKMapView SwiftUI

  21. 21

    How do I tell if an XMLHttpRequest failed due to a network issue?

  22. 22

    How can I tell if a hard drive will fit my laptop?

  23. 23

    How can I tell if a hard drive will fit my laptop?

  24. 24

    timestamps passed to matplotlib.date2num: 'str' object has no attribute 'toordinal'

  25. 25

    AngularJS : check if a model value has changed

  26. 26

    InStr(1,cell.Value,“-”)似乎与Not不兼容

  27. 27

    Pandas sum across columns and divide each cell from that value

  28. 28

    PHPExcel set font/background colour based on cell value

  29. 29

    create a paired value cell array from existing vectors

热门标签

归档