There are some text fields in my Sproutcore code. However, I need to check the input validation for the text field.
Are there any mechanisms which I can do that like in traditional html/js? Could you please attach some code? Thanks.
Currently I just use the alert().
Assuming you're using
SC.TextFieldView
, you can use Validator. Here is an example:You can create your own validators to feet your needs. For examples and documentation, take a look at :