- #1
iamjon.smith
- 117
- 3
Mod note: The OP has found an answer to his question.
I am validating a text field in javascript in EXTJS 4 framework, based on the selected value of a text box:
In this scenario, "type" is a standard combobox and "appy_before" is a checkbox. If type = Cell Value and apply_before is checked, I need to validate a text box (range_from) contains a valid excel cell location, and that a second text box (range_to) is empty and if validation passes, set isValid = true, else isValid = false.
I know part of it should be as follows:
The only direction I have been given so far is:
ASPOSE function: CellsHelper.cellNameToIndex may be used to get the valid cells
but I have no Idea how to implement this as a solution. Please provide any help that is available.
I am as stuck as I can get at this point, as I have no idea where to go from the code that is posted...
I am validating a text field in javascript in EXTJS 4 framework, based on the selected value of a text box:
Code:
else if (record.get("type") === "CELL_VALUE" && record.get("apply_before") === true)
{
Ext.Msg.alert("Field Validation", "I am Validating the CELL VALUE COMBO VALUE"); //alert message for testing only, this is where validation will occur
}
In this scenario, "type" is a standard combobox and "appy_before" is a checkbox. If type = Cell Value and apply_before is checked, I need to validate a text box (range_from) contains a valid excel cell location, and that a second text box (range_to) is empty and if validation passes, set isValid = true, else isValid = false.
I know part of it should be as follows:
Code:
else if (record.get("type") === "CELL_VALUE" && record.get("apply_before") === true)
{
if (rangeFrom != valid excel cell location**problem here**) || (rangeTo != null)
isValid = false;
}
The only direction I have been given so far is:
ASPOSE function: CellsHelper.cellNameToIndex may be used to get the valid cells
but I have no Idea how to implement this as a solution. Please provide any help that is available.
I am as stuck as I can get at this point, as I have no idea where to go from the code that is posted...
Last edited by a moderator: